GWT archtype

117 views
Skip to first unread message

jgardner

unread,
Mar 24, 2011, 12:36:40 AM3/24/11
to maven-gae-plugin
Hey guys so with a little work I this to load the run doing gae:run.
However if I do gwt:run I get

java.lang.RuntimeException: Unable to discover the Google App Engine
SDK root. This code should be loaded from the SDK directory

Do you know how I can set SDK root?

Brendan Doherty

unread,
Mar 24, 2011, 7:47:43 AM3/24/11
to maven-ga...@googlegroups.com, jgardner
I don't use the archetype, but I've found adding the line <extraJvmArgs>-Dappengine.sdk.root=${gae.home}</extraJvmArgs> is required for me to use mvn gwt:run otherwise I get:
[ERROR] Caused by: java.lang.RuntimeException: Unable to discover the Google App Engine SDK root. This code should be loaded from the SDK directory, but was instead loaded from file:/home/brendan/.m2/repository/com/google/appengine/appengine-tools-sdk/1.4.2/appengine-tools-sdk-1.4.2.jar.  Specify -Dappengine.sdk.root to override the SDK location.

Here is my gwt-maven-plugin configuration. Perhaps I'm doing something wrong and this shouldn't be necessary.

<configuration>
   ...
   <gae.home>${user.home}/.m2/repository/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}</gae.home>
   ...
</configuration>

<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>${gwt-maven-plugin.version}</version> <configuration> <appEngineVersion>${gae.version}</appEngineVersion> <appEngineHome>${gae.home}</appEngineHome> <logLevel>INFO</logLevel> <style>${gwt.style}</style> <runTarget>/index.html</runTarget> <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp> <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server> <compileReport>true</compileReport> <copyWebapp>true</copyWebapp> <module>com.propertysimplified.Propertysimplified_Dev</module> <localWorkers>${num.cores}</localWorkers> <!-- appEngineHome doesn't seem to work, need appengine.sdk.root set too --> <extraJvmArgs>-Dappengine.sdk.root=${gae.home}</extraJvmArgs>j </configuration> <executions> <execution> <configuration> <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> </configuration> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin>

Ja...@wetheinter.net

unread,
May 28, 2012, 9:57:12 PM5/28/12
to maven-ga...@googlegroups.com, jgardner
Great stuff!  Thanks for this, it helped me get gwt:run to work.

The only addition I have to make is that users of the old google groups will not see your xml properly formatted, and might accidentally have two <extraJvmArgs> tags; if anyone has problems with Brendan's solution, either switch to the new google groups to see the xml formatted correctly, or either a) move your -Xmx configuration into the execution block, or b) compile your -Dappengine.sdk.root and -Xmx tags into the same <extraJvmArgs> tag.

Many thanks to you good sir!
Reply all
Reply to author
Forward
0 new messages