Does anyone know of a good guide for creating a project with the new 2.0 release of GWT using maven and eclipse? I am running into a lot of problems getting them to play nicely together.
For what it’s worth, I can create a gwt project using the maven eclipse plugin which works fine, but porting it to maven doesn’t work (so a guide for this would be great).
Likewise, I can use the maven plugin (gwt-maven-plugin), but when I import it to eclipse (import -> materialize maven projects), it does not get recognised as a GWT project…
Thanks
EDIT: I’ve updated my answer with additional steps provided by the OP. Credits to the OP for the details.
I just broke my Eclipse setup trying to install the latest version of the Google Plugin for Eclipse (for GWT 2.0) so I can’t confirm everything but, let’s assume the following prerequisites are fulfilled:
Did you try to:
Create a new project from Eclipse (New > Other… then select Maven Project and choose the gwt-maven-plugin archetype).
Edit the generated
pom.xml, update thegwt.versionproperty to2.0.0(which has been released in the central repo),add the Codehaus Snapshot repositoryand set thegwt-maven-pluginversion to1.2-SNAPSHOT(the version 1.2 isn’t released in central, this should happen soon)1.2(which has been released in central too).Add a
<runTarget>to the gwt-maven-plugin configuration as documented in Using the Google Eclipse Plugin.Configure the maven-war-plugin as documented in the page mentioned in the previous step.
Manually enable GWT on the project from project preference by setting the Use Google Web Toolkit checkboxThis step is unnecessary since you’ll be building/running with a Maven run configuration, not the GWT Plugin for Eclipse.This is how my
pom.xmlactually looks like:Run the
gwt:eclipsegoal (using m2eclipse Maven2 > build…) to setup your environment and create the launch configuration for your GWT modules.Run
gwt:compile gwt:runto compile and run a GWT module in the GWT Hosted mode.