Today I wanted to start working on my first Google App Engine (GAE) project in Eclipse. As always, I wanted to stick to maven2 with its great dependency management and WAR deployment. Unfortunately, I experienced some troubles with the combination of the GAE/GWT plugin and Sonatype’s m2eclipse plugin after the execution of the following (thanks to the guys at Ham and eggs for the hints and the provided archetype):
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \ -DarchetypeGroupId=org.beardedgeeks \ -DarchetypeArtifactId=gae-eclipse-maven-archetype \ -DarchetypeVersion=1.1.2 \ -DarchetypeRepository=http://beardedgeeks.googlecode.com/svn/repository/releases
Eclipse Galileo (3.5) kept complaining:
The App Engine SDK ‘
/com/google/appengine/appengine-api-1.0-sdk/1.3.1/appengine-api-1.0-sdk-1.3.1.jar’ on the project’s build path is not valid (SDK location ‘ /com/google/appengine/appengine-api-1.0-sdk/1.3.1/appengine-api-1.0-sdk-1.3.1.jar’ is not a directory)
I finally got the correct hint on this site:
Under Java Build Path, select the Order and Export tab and move all Maven dependencies to the BOTTOM. Otherwise, GPE will see the App Engine and GWT SDKs from the Maven repo on the build path and complain that they are not valid. This is because GPE expects a specific SDK structure used to enable other tooling.
Hope this helps someone else!