GoogleWebToolkitMaven
References and Related Pages
- GWTOpenID - Use of GWT with OpenID & RPX script supplied by myOpenID.
- Generate Async Interfaces - Using Maven to do some of the dirty work of generating a RemoteService.
- HibernateAndMySQL - Using Hibernate and MySQL within GWT.
- GWTMultiModule - Multiple modules within a single "app" or project.
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
- Update site: http://dl.google.com/eclipse/plugin/3.4.
- Grab both the plugin and the SDK:
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
- Add the "Sandbox" plugin repositories according to this page.
- Create a Launch configuration (right-click on project -> Run As -> Maven Build …)
- Select as a goal gwt:eclipse (org.codehaus.mojo:gwt-maven-plugin:1.1:eclipse).
- Save under the name "<app> - Build Run Config".
- Run this Launch configuration
- A new Google "Web Application" Run Config will then be available for running the app in hosted mode.
- 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_revision: 35, last_edited: 1256849198|%e %b %Y, %H:%M %Z (%O ago)





