10
votes

Since version 1.7.4. of Google App Engine the official appengine-maven-plugin is released by Google. It has a task appengine:devserver to start the local development server.

This plugin seems not to have any Maven configuration options.

I wonder how I can a) provider jvm flags b) to disable new version check (when working offline)

Note that until now I was using the unofficial net.kindleit maven-gae-plugin like:

<plugin>
    <groupId>net.kindleit</groupId>
    <artifactId>maven-gae-plugin</artifactId>
    <version>0.9.4</version>
    <configuration>
        <disableUpdateCheck>true</disableUpdateCheck>
        <javaAgent>${env.REBEL_HOME}/jrebel.jar</javaAgent>
        <jvmFlags>
            <jvmFlag>-noverify</jvmFlag>
            <jvmFlag>-Ddatastore.backing_store=${project.basedir}/local_db.bin</jvmFlag>
            <jvmFlag>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</jvmFlag>
            <jvmFlag>-Drebel.spring_data_plugin=true</jvmFlag>
        </jvmFlags>
        <wait>true</wait>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-tools-sdk</artifactId>
            <version>${com.google.appengine.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-1.0-sdk</artifactId>
            <version>${com.google.appengine.version}</version>
        </dependency>
    </dependencies>
</plugin>
3
Whoa, there's an official plugin now?! - TheLQ
Is this related to this question stackoverflow.com/questions/13924990/… ? Since the server started by appengine:devserver cannot be given a remote debug port as argument, it can never be debugged - H-H

3 Answers

8
votes

I wrote the plugin, so I guess this is my fault. The configuration is well supported for appcfg operations (like update/rollback/etc.), but I need to fix a few things obviously for the development server. I'll get onto that and there should be an update soon.

UPDATE : I've pushed a snapshot build that supports configuration for the devserver target. It's in 1.7.5-SNAPSHOT.

YOU WILL NEED TO READ THIS TO USE SNAPSHOT BUILDS : http://code.google.com/p/appengine-maven-plugin/

8
votes

It looks like 1.7.5 of both the SDK and Maven plugin are now available from the normal Maven repository thus it should be sufficient to simply update those dependencies to the 1.7.5 version and omit the declaration of the SNAPSHOT repository. The 1.7.5 maven-appserver-plugin does seem to support jvmFlags like the following:

<configuration>
    <jvmFlags>
        <jvmFlag>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</jvmFlag>
    </jvmFlags>
</configuration>

Yea!

Thank you to MattStep and the Google team!

5
votes

Having exactly that issue myself. Checking the actual sources for the plugin, the DevAppServerRunner has zero support for passing extra arguments of any kind to the dev server. It looks like the best way to do it at the moment is to use the unofficial plugin.

source for DevAppServerRunner.java