Starting GWT with Maven

Jun 14 2009

Starting GWT with Maven

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
Created by Tharindu Madushanka on 2009/06/14 12:59
Last modified by Marta Girdea on 2009/06/17 21:46

Workstream


This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 2.4.30467 - Documentation