How to Create your First Java EE Application for Jelastic

1) Create the environment in the console.

2) Add your account to the Maven settings:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <profiles>
    <profile>
      <id>jelastic</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <jelastic.username><!-- Username --></jelastic.username>
        <jelastic.password><!-- Password --></jelastic.password>
      </properties>
    </profile>
  </profiles>
</settings>

3) Add the Maven Plugin for Jelastic Cloud Platform to your project:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>com.jelastic</groupId>
        <artifactId>jelastic-maven-plugin</artifactId>
        <version>1.6</version>
        <configuration>
          <context>ROOT</context>
          <environment><!-- Environment Name --></environment>
          <api_hoster><!-- Hoster's API as in http://jelastic.com/docs/jelastic-hoster-info --></api_hoster>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-oss-public</id>
      <url>https://oss.sonatype.org/content/groups/public</url>
    </pluginRepository>
  </pluginRepositories>
</project>

4) Execute the jelastic:deploy goal to deploy.

You can find more details here.

A sample is available here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s