Skip to content

The maven-gae-plugin provides support for Google App Engine projects. Basically, it attempts to cover all the basic operations provided by Google App Engine SDK, such as running project locally, deploying it to Google's cloud, retrieving production logs etc.

Notifications You must be signed in to change notification settings

salk31/maven-gae-plugin

 
 

Repository files navigation

#Maven GAE Plugin

##Versions maven-gae-plugin released versions.

maven-gae-plugingae-runtime
  • Version 0.9.5
  • Version 0.9.4
    Supports a way of adding arbitrary flags.
  • Version 0.9.3
    Support for --application argument
  • Version 0.9.2
    Code moved to github.
  • Version 0.9.1
    Adds update-dos goal (issue 145).
    Fixes long standing cron goal issue (issue 117).
  • Version 0.9.0
    Adds Backends Support (issue 135).
  • Version 0.8.4
    Updates to some used maven plugins
    Fix to the way sourceEncoding is done (issue 120).
  • Version 0.8.2
    Minor bug fixes.
  • Any Version See Configuration Below
  • Version 1.8.5
  • Version 1.8.4
  • Version 1.7.0
    Targets Google App Engine 1.7.0
    Updates the datanucleus-appengine dependency to 2.0.1.1
  • Version 1.6.4
    Targets Google App Engine 1.6.4
  • Version 1.6.3
    Targets Google App Engine 1.6.3
  • Version 1.6.2.1
    Targets Google App Engine 1.6.2.1

##Maven Configuration

  • How to setup the maven-gae-plugin in the pom.xml so that it can use any Google App Engine version stated.

    <properties>
        <!-- GAE Plugin ((almost) Any GAE Version) -->
        <gae.version>1.7.7</gae.version>
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <gae.home>${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}</gae.home>
    </properties>
    
    <plugin>
        <groupId>net.kindleit</groupId>
        <artifactId>maven-gae-plugin</artifactId>
        <version>0.9.5</version>
        <configuration>
            <unpackVersion>${gae.version}</unpackVersion>
            <appDir>${webappDirectory}</appDir>
            <sdkDir>${gae.home}</sdkDir>
            
            <!-- Add credentials to ~/.m2/settings.xml <id>appengine-credentials</id> -->
            <serverId>appengine-credentials</serverId>
            <splitJars>true</splitJars>
        </configuration>
        <dependencies>
            <!-- Google App Engine API -->
            <dependency>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-api-1.0-sdk</artifactId>
                <version>${gae.version}</version>
            </dependency>
            <!-- Google App Engine Runtime Dependencies -->
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jta_1.1_spec</artifactId>
                <version>1.1.1</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jpa_3.0_spec</artifactId>
                <version>1.1.1</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>javax.jdo</groupId>
                <artifactId>jdo2-api</artifactId>
                <version>2.3-eb</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-core</artifactId>
                <version>1.1.5</version>
            </dependency>
            <dependency>
                <groupId>com.google.appengine.orm</groupId>
                <artifactId>datanucleus-appengine</artifactId>
                <version>1.0.10</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-jpa</artifactId>
                <version>1.1.5</version>
                <scope>runtime</scope>
            </dependency>
            <!-- App Engine Runtime Dependencies -->
            <dependency>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-tools-sdk</artifactId>
                <version>${gae.version}</version>
            </dependency>
        </dependencies>
    </plugin>
  • How to setup the plugin using this maven plugin GAE runtime.

    <properties>
         <gae.version>1.7.7</gae.version>
         <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
         <gae.home>
             ${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}
         </gae.home>
    <propertiess>
    
    <plugin>
        <groupId>net.kindleit</groupId>
        <artifactId>maven-gae-plugin</artifactId>
        <version>0.9.5</version>
        <configuration>
            <sdkDir>${gae.home}</sdkDir>
                <!-- Add credentials to ~/.m2/settings.xml <id>appengine-credentials</id> -->
                <serverId>appengine-credentials</serverId>
                <splitJars>true</splitJars>
            </configuration>
            <executions>
                <execution>
                    <id>unpack</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                </execution>
                <execution>
                    <id>deploy</id>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
  • Using this plugins latest snapshot add the pluginRepositories element to the pom.

    <pluginRepositories>
       <pluginRepository>
         <id>sonatype.snapshots</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
       </pluginRepository>
    </pluginRepositories>

##Maven Configuration for Integration Testing

  • Using the GAE Runner for integration tests with Selenium.

    <properties>
        <!-- GAE Plugin ((almost) Any GAE Version) -->
        <gae.version>1.7.7</gae.version>
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <gae.home>${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}</gae.home>
        
        <!-- These are setup by default. -->
        <gae.wait>false</gae.wait>
        <gae.stop.port>8081</gae.stop.port>
        <gae.port>8888</gae.port>
        <gae.address>127.0.0.1</gae.address>
    </properties>
    
    <plugin>
        <groupId>net.kindleit</groupId>
        <artifactId>maven-gae-plugin</artifactId>
        <!-- Use the snapshot until we get 9.6 released. -->
        <version>0.9.6-SNAPSHOT</version>
        <configuration>
            <unpackVersion>${gae.version}</unpackVersion>
            <appDir>${webappDirectory}</appDir>
            <sdkDir>${gae.home}</sdkDir>
            
            <!-- Add credentials to ~/.m2/settings.xml <id>appengine-credentials</id> -->
            <serverId>appengine-credentials</serverId>
            <splitJars>true</splitJars>
        </configuration>
        <executions>
            <execution>
                <id>unpack</id>
                <phase>validate</phase>
                <goals>
                    <goal>unpack</goal>
                </goals>
            </execution>
            <execution>
                <id>start-gae</id>
                <phase>pre-integration-test</phase>
                <goals>
                    <goal>start</goal>
                </goals>
            </execution>
            <execution>
                <id>stop-gae</id>
                <phase>post-integration-test</phase>
                <goals>
                    <goal>stop</goal>
                </goals>
            </execution>
        </executions>
        <dependencies>
            <!-- Google App Engine API -->
            <dependency>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-api-1.0-sdk</artifactId>
                <version>${gae.version}</version>
            </dependency>
            <!-- Google App Engine Runtime Dependencies -->
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jta_1.1_spec</artifactId>
                <version>1.1.1</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jpa_3.0_spec</artifactId>
                <version>1.1.1</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>javax.jdo</groupId>
                <artifactId>jdo2-api</artifactId>
                <version>2.3-eb</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-core</artifactId>
                <version>1.1.5</version>
            </dependency>
            <dependency>
                <groupId>com.google.appengine.orm</groupId>
                <artifactId>datanucleus-appengine</artifactId>
                <version>1.0.10</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-jpa</artifactId>
                <version>1.1.5</version>
                <scope>runtime</scope>
            </dependency>
            <!-- App Engine Runtime Dependencies -->
            <dependency>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-tools-sdk</artifactId>
                <version>${gae.version}</version>
            </dependency>
        </dependencies>
    </plugin>

##Maven Generated site information You can find a copy of the maven generated site information here and here.

##Boilerplate / Archetypes JAppStart is a very complete jump start for java GAE developers. Spring Roo is also a great tool for setting up all the boilerplate code.

You can also find the following archetypes for your applications:

  • Plain JSP based example:

     mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp \
     -DarchetypeVersion=0.9.4 -DgroupId=com.myapp.test -DartifactId=testapp
    
  • Wicket based example

     mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-wicket \
     -DarchetypeVersion=0.9.4 -DgroupId=com.myapp.test -DartifactId=testapp
    
  • GWT based example

     mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-gwt \
     -DarchetypeVersion=0.9.4 -DgroupId=com.myapp.test -DartifactId=testapp
    
  • JSF based example

     mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsf \
     -DarchetypeVersion=0.9.4 -DgroupId=com.myapp.test -DartifactId=testapp
    

##Issues Issues are tracked in github.

##Build Server

About

The maven-gae-plugin provides support for Google App Engine projects. Basically, it attempts to cover all the basic operations provided by Google App Engine SDK, such as running project locally, deploying it to Google's cloud, retrieving production logs etc.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%