GoogleWebToolkitMaven

References and Related Pages

History

  • Started this project outside of Maven.
  • Looked at one archetype, but didn't get far.
  • Found this plugin which seems to take care of a few things:
    • Generating the WAR file as Cypal Studio did
    • Dependency Management as Maven does so well
    • Async creation appears to be managed.

Background

There are a few different projects creating GWT Maven Plugins for Eclipse:

  • org.codehaus.mojo
  • com.totsp.gwt
  • I think I found another one as well.

The Google page recommends using the codehaus versions.

  • Just located this post describing some of the conflicts I appear to be bumping into. The page GWTMaven-1.6 describes this attempt.

Install/Configure GWT-Maven Plugin from Google inside Eclipse

Maven specific pieces are loaded as a dependency listed in the pom

  1. Update site: http://dl.google.com/eclipse/plugin/3.4.
  2. Grab both the plugin and the SDK:
eclipseGWTPlugin.png

New Project

  • Depends on
    • Maven standalone installation
    • M2eclipse plugin for eclipse

1. Run the Maven Archetype

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

This gives me errors that I've been ignoring:
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 30,column 16] : ${gwt.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 36,column 16] : ${gwt.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 85,column 21] : ${maven.compiler.source} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 86,column 21] : ${maven.compiler.target} is not a valid reference.

2. Import the project into Eclipse using Maven wizard
File -> Import -> General -> Maven Projects

3. Configure the project to use Google Web Toolkit
configNewGWTProject.png
  1. Add the "Sandbox" plugin repositories according to this page.
  2. Create a Launch configuration (right-click on project -> Run As -> Maven Build …)
    1. Select as a goal gwt:eclipse (org.codehaus.mojo:gwt-maven-plugin:1.1:eclipse).
    2. Save under the name "<app> - Build Run Config".
    3. Run this Launch configuration
    4. A new Google "Web Application" Run Config will then be available for running the app in hosted mode.
  3. Since there is a simple app pre-defined when the archetype was generated, you can execute this new Run Config to check that all the pieces have been installed correctly.
Page tags: gwt maven
page_revision: 35, last_edited: 1256849198|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License