Lately, the support of Maven for the Google Plugin for Eclipse (GPE) has been enhanced. Since GPE 2.1, you can File | Import… | Existing maven project, point it to your POM, and everything should just work. You can start the development mode without running any additional goals like ‘mvn eclipse:eclipse’ anymore. Or at least this is what I ‘d like to see happening while trying out the new GPE, but…
GEP fails to locate module descriptor in “src/main/resources”
Maven2 philosophy dictates that all non-java resources that should be available on the classpath should reside on “src/main/resources”. While placing your gwt.xml file under “src/main/resources” will work with ‘mvn gwt:run’, GPE will fail to discover it even if the <module/> configuration property of the gwt-maven-plugin has been specified. No matter what, running your app in Eclipse (Run | Run As | Web Applicaiton) will result in the following error:
Missing required argument 'module[s]' Google Web Toolkit 2.3.0 ... module[s] Specifies the name(s) of the module(s) to host
This one turned out to be a known GPE issue (Issue 3759) and the recommended workaround is to place your GWT module descriptor in “src/main/java”.
Contents of “src/main/webapp” are not getting copied to the hostedWebapp *Solved*
While running the development mode server the resources of “src/main/webapp” are expected to be found under the hostedWebapp directory (i.e. target/${project.build.finalName}) and using the copyWebapp configuration property should have copied them. Unfortunately, this is still not working for me and I ‘ve experienced errors like FileNotFoundExceptions and 404 errors despite using the AppEngineLauncher or the internal Jetty server.
To get around this, I have to run ‘mvn war:exploded‘ before starting the development mode. Read also this FAQ entry.
—
Update: As commented by David Chandler, in order for the GPE to copy the “src/main/webapp” to the hostedWebapp directory, you need to have the m2extras’ “Maven Integration for WTP” plugin installed as well as m2eclipse. Here is the m2extras update site: http://m2eclipse.sonatype.org/sites/m2e-extras
No App Engine SDKs found on the build path
This is a minor but annoying one. GPE will search your POM’s dependencies for a GAE SDK and if it doesn’t find one (let’s say because you don’t use GAE), Eclipse will report the following problem:
Google App Engine Problem (1 item) > The project 'xxx' does not have any App Engine SDKs on its build path
To get rid of it you can either go to Project | Properties | Google | App Engine and deselect ‘Use Google App Engine’ or consider adding a dependency for GAE SDK in your POM
<dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-1.0-sdk</artifactId> <version>${gae.version}</version> </dependency>