Marcel Overdijk
Marcel Overdijk

Reputation: 11467

appengine-maven-plugin configuration options like jvm flags

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>

Upvotes: 10

Views: 4605

Answers (3)

James Courtney
James Courtney

Reputation: 153

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!

Upvotes: 9

MattStep
MattStep

Reputation: 431

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/

Upvotes: 8

timothyb89
timothyb89

Reputation: 220

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

Upvotes: 5

Related Questions