I donâ€™t know how many times I had to start over and over again, searching for the latest versions, searching for â€žhow to makeâ€ś the Google Eclipse Plugin, eclipse and maven work together.
The problem is: too many tools that donâ€™t seem to like each other fighting over project layout and classpath. Java EE packaging specs and GWT specialities coming from DevMode donâ€™t really make things easier. If you were not a pro in all of this, you ended up with a mess. I have seen it too often.
Since m2e integration things started getting better. And finally, using recent versions from the following official update sites, it started working flawlessly. Even the DevMode/ classpath issue that made us patch the Jetty launcher past year is solved!
What you need:
- m2e â€“ maven integration for eclipse
- m2e-wtp â€“ maven Integration for WTP
I am using the latest stable releases from eclipse.org. Well, not always, I am going as stable as possible: the actual wtp integration is still in incubationâ€¦ but worksâ€¦
Talking numbers, this are the version numbers I used here:
- m2e â€“ Maven Integration for Eclipse 220.127.116.1120903-1050
- m2e-wtp â€“ Maven Integration for WTP (Incubation) 0.16.0.20120914-0945
- m2e connector for mavenarchiver pom properties 0.15.0.201207090125-signed-201209140800
I have installed a few m2e connectors I required for other non GWT projects, I think they are not needed for a GWT project. Just for the curious:
M2E connectors are a bridge between Maven and Eclipse. When a maven plugin is bound to a lifecycle phase like generate-sources, or process-sources it becomes a part of Eclipse build. (source)
Donâ€™t use the archetype. And if you do, remove theÂ maven-war-plugin plugin. I am using the copyWebapp configuration option in theÂ gwt-maven-plugin to copy the
stuff into the folder used by the DevMode and build system located atÂ
<!-- GWT Maven Plugin -->
<extraJvmArgs>-Xms128m -Xss1M -Xmx512m -XX:MaxPermSize?=512M</extraJvmArgs>
By the way, defaults work fine now, there is no need to setup/ fix the path configs for the plugin anymore. If you use M2E to update the project configuration things will work.
If you are sure your config is right, and you are absolutely sure you have at least the versions mentioned above, try killing your eclipse config with
mvn clean eclipse:clean
This will leave you with a completely missconfigured project in eclipse. Let m2e update the project again. Sometimes I get the error that m2e did fail setting up the project description. Ignore it, do it again.