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

| DevOps PaaS | October 21, 2011

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