неділя, 6 березня 2011 р.

How to create gwt maven project?

How to create gwt maven project? Easy! Just run

mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.1.0-1

This maven plugin generates project based on GWT version 2.1.0  If you prefer to use version 2.2.0, just replace version in pom.xml. Then the following compilation error will occur

java.lang.NoClassDefFoundError: com/google/gwt/core/ext/GeneratorExt
[INFO] at java.lang.ClassLoader.defineClass1(Native Method)
[INFO] at java.lang.ClassLoader.defineClassCond(
[INFO] at java.lang.ClassLoader.defineClass(

You should add dependency on gwt-dev.jar

By maven-googlewebtoolkit2-plugin