Category: GWT

Getting started with GWT and Maven2

The easiest way to get started with GWT is to use the gwt-maven-plugin and run the archetype:generate command. It will generate a skeleton project for your that you can use to compile and run a GWT application.

Below is the command to generate the skeleton:

mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=1.2 -DgroupId=myGroupId -DartifactId=myArtifactId

By default this version of the archetype uses GWT 1.7.1. Change the GWT version in the pom.xml to a 2.0.x version and you are ready to go!

Launch the generated application with the following command:

mvn clean install gwt:run