Cloud hosting with Maven plugin: locally build and automatically deploy Java to the cloud

By October 21, 2011 HowTo 7 Comments
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

As you probably know, 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.

We have good news for developers who use Maven. You can now automatically deploy your projects to your environments in Jelastic!

Here’s what you do:

  1. Go to and sign-up if you haven’t already,
  2. Login with your Jelastic credentials by clicking the Log In link on the page,
  3. Create your environment in Jelastic,
  4. Specify the resource limits you want to be set for the environment you want to use and specify your environment name (an example below):
  5. Install Maven (if you don’t have it installed yet),
  6. Modify configuration files: settings.xml & pom.xml like shown below:


Add the following tags (Profile and Plugin Repository) to your settings.xml file. In this block developer specifies authentication information:

                <jelastic.username>[insert your Jelastic username]</jelastic.username>
                <jelastic.password>[insert your Jelastic password]</jelastic.password>

Add block Plugin Repository to settings.xml:



Add to your pom.xml file the plugins section:

<!-- ... -->
     <context><!-- insert your context path or ROOT for default --></context>
     <environment><!-- insert your environment name --></environment>
     <api_hoster><!-- default value "" --></api_hoster>
<!-- ... -->

Insert in <api_hoster> tag API depending on your hoster. You can find the necessary API in the document Hosters Info.

7. Now, all you need to initiate your application deployment, is just type this command line on your Windows or Linux computer:

mvn jelastic:deploy

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone


  • I’m getting “peer not authenticated” when I run mvn jelastic:deploy. What can I do?

    [INFO] — jelastic-maven-plugin:1.5:deploy (default-cli) @ my-app —
    [ERROR] peer not authenticated peer not authenticated
    at org.apache.http.conn.ssl.AbstractVerifier.verify(
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(
    at org.apache.http.impl.client.DefaultRequestDirector.execute(
    at org.apache.http.impl.client.AbstractHttpClient.execute(
    at org.apache.http.impl.client.AbstractHttpClient.execute(
    at org.apache.http.impl.client.AbstractHttpClient.execute(
    at org.apache.http.impl.client.AbstractHttpClient.execute(

    [INFO] ————————————————————————
    [INFO] Authentication : SUCCESS
    [INFO] Session : null
    [INFO] ————————————————————————

  • Ok, this has something to do with the company proxy-server :-(. Running the mvn jelastic:deploy from my home-network works fine!

    • Hi Ivar! Now you can also build applications in Jelastic cloud instead of building your projects locally and uploading WAR archives. Jelastic has new feature – build node Maven.

  • […] Using Maven plug-in to automatically push builds to the cloud, […]

  • […] I also realized jelastic has a description how to deploy your project using maven after I finalized this […]

  • URL says:

    Wow! This could be one particular of the most helpful blogs We’ve ever arrive across on this subject. Basically Excellent. I’m also an expert in this topic therefore I can understand your effort. 104260

Leave a Reply

Subscribe to get the latest updates