Maven Plugin for Jelastic Cloud Platform

Maven is a tool that can be used for building and managing Java projects. It makes the build process easy, provides a uniform build system, quality project information, guidelines for best practices development, allows transparent migration to new features. You can deploy your projects to the Jelastic environment via Maven.

Here's what you do:

  1. Log onto
  2. Create your environment in Jelastic.
  3. Specify the cloudlet limits you want to be set for the environment and enter your environment name.
  4. Download the latest Maven version and unzip it locally.
  5. Create your Maven web-project (manually or using any IDE).
  6. Modify pom.xml configuration file in your project like shown below:

    • in the < plugins > section add the following info:
    • <plugin>
          <email>[insert your Jelastic login]</email>
          <context>[specify the context if you need it]</context>
          <environment>[insert the name of Jelastic environment]</environment>
          <comment>[insert comment if you need it]</comment>
         <api_hoster>[put here API of your hoster]</api_hoster>

      API of your hoster you can find in the document Hosters Info.

    • add the < pluginRepositories> section:

    Don't forget to save the changes.

  7. Open the command line on your computer and navigate to the folder with your maven project. Here, you can perform the following commands:

    • mvn jelastic:deploy -Djelastic.password=your_password

    • Type this command to initiate your application deployment (substitute the your_password placeholder with your actual Jelastic account password). You will get the ensuing info in your command line:
      > mvn jelastic:deploy -Djelastic.password=passw0rd
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building maven-plugin 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] --- jelastic-maven-plugin:1.9:deploy (default-cli) @ maven-plugin ---
      [INFO] ------------------------------------------------------------------------
      [INFO]    Authentication : SUCCESS
      [INFO]           Session : 272xa3cd00829862227ecce11492910745cf
      [INFO] ------------------------------------------------------------------------
      [INFO] File Uploading Progress :
      [INFO] [1%]
      [INFO] [2%]
      [INFO] [3%]
      [INFO] [4%]
      [INFO] [5%]
      [INFO] [6%]
      [INFO] [7%]
      [INFO] [8%]
      [INFO] [9%]
      [INFO] [11%]
      [INFO] [12%]
      [INFO] [98%]
      [INFO] [99%]
      [INFO] [100%]
      [INFO]       File UpLoad : SUCCESS
      [INFO]          File URL :[hoster₀™s_domain]/xssu/rest/download/RDYYHFQ1AlJeVlpPYgFqQURHWhEAThAQARJqTClxcQVAFxVTDwUBQmNTTEBI
      [INFO]         File size : 3135
      [INFO] ------------------------------------------------------------------------
      [INFO] File registration : SUCCESS
      [INFO]   Registration ID : 2127
      [INFO]      Developer ID : 626
      [INFO] ------------------------------------------------------------------------
      [INFO]       Deploy file : SUCCESS
      [INFO]        Deploy log :
      [INFO] --2013-04-10 09:23:32--[hoster's_domain]/xssu/rest/download/RDYYHFQ1AlJeVlpPYgFqQURHWhEAThAQARJqTClxcQVAFxVTDwUBQmNTTEBI
      Connecting to[hoster's_domain]||:80... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 2684 (2.6K) [application/octet-stream]
      --2013-04-10 09:23:32--[hoster's_domain]/xssu/rest/download/RDYYHFQ1AlJeVlpPYgFqQURHWhEAThAQARJqTClxcQVAFxVTDwUBQmNTTEBI
      Reusing existing connection to[hoster's_domain]:80.
      HTTP request sent, awaiting response... 200 OK
      Length: 2684 (2.6K) [application/octet-stream]
      Saving to: У/var/cache/downloads/maven-plugin-1.0-SNAPSHOT.warФ
          0K ..                                                    100%  199M=0s
      2013-04-10 09:23:32 (199 MB/s) - У/var/cache/downloads/maven-plugin-1.0-SNAPSHOT.warФ saved [2684/2684]
      [INFO]            LogOut : SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 18.790s
      [INFO] Finished at: Wed Apr 10 12:23:38 EEST 2013
      [INFO] Final Memory: 7M/102M
      [INFO] ------------------------------------------------------------------------

    • mvn jelastic:publish

    • Type this command if you want to build and upload WAR file to the Deployment manager without deployment.

    • mvn clean install jelastic:deploy

    • Use this command if you want to redeploy your project after applying some changes in the code.

  8. To make sure everything works, navigate to the Jelastic dashboard, expand the list of contexts for your application server and click Open in browser button for the context you've deployed your application to (it is ROOT by default).

  9. use java

    In the opened window the first page of your project will be displayed. In our case it is HelloWorld application.

    As a result you can see that your project is successfully built and deployed via Maven.