I have started studying GWT. I started reading ebook
GWT in Practice. It helped me to quickly understand the basics of a GWT Project and Then I looked for how we could create and build a GWT project with Maven. Here are some important points to create a GWT maven project.
- Download and install maven google web toolkit archetype. Download maven-googlewebtoolkit2-archetype-1.0.4.jar file from this link. GWT-Maven Archetype
- Install the downloaded maven archetype
mvn install:install-file \
-DgroupId=com.totsp.gwt \
-DartifactId=maven-googlewebtoolkit2-archetype \
-Dversion=1.0.4 \
-Dpackaging=jar
-Dfile=path/to/downloaded/jar/file/maven-googlewebtoolkit2-archetype-1.0.4.jar
- Now you can create the maven GWT project with the following command running in terminal
mvn archetype:create \
-DarchetypeGroupId=com.totsp.gwt \
-DarchetypeArtifactId=maven-googlewebtoolkit2-archetype \
-DarchetypeVersion=1.0.4 \
-DgroupId=myGroupId \
-DartifactId=myArtifactId
- After all this, you can run your GWT project in hosted mode and take all GWT advantages using following command
mvn gwt-maven:gwt
- Or you can build a WAR file using this.
mvn clean gwt-maven install