If you read my OJ article on GWT, you saw the first version of the maven plugin. It has been updated since then, but we have been somewhat… negligent in releasing. So there is a new version avialable at our Google Code site.
Details after the bump.
The 1.0.3 version of the Maven 1 plugin is available in the repo. To install:
This is a greatly enhanced version of the original. It includes several new features:
This goal will take the servlets declared in your GWT module and add them to the web.xml file in the target/webapp (or whatever) directory. This means you only have to declare your servlets in the gwt.xml file, not in both places. To go along with this, you can use:
To spit out a ready-to-go war file.
Also, the default targets of gwt and gwt:debug have been enhanced. They will both now build a tomcat directory under “google.webtoolkit.tomcat”, defaults to target/tomcat. This will include your context.xml in the right place, and take the non-GWT elements defined in your web.xml file and add them to the web.xml file the shell runs with, so your whole application should run. You should note, however, that if you want to use Tomcat DataSources, you still need to include commons-dbcp and commons-pool as project dependencies, just set them to war.bundle=false. This will ensure they are there when the shell runs, but don’t end up in your war file.
There are some changes to the properties. First, the declaring of the dev-*.jar in the project.properties has gone away. We just add all of them to the classpath and hope you haven’t put multiple versions in the same directory!
google.webtoolkit.tomcat : sets the root for catalina.base when shell runs.
google.webtoolkit.extrajvmarg : Passes additional JVM args when shell and debug run.
If you are using a mac, you want to run maven with
or put it in your ~/build.properties file.
Charlie is working on an extended sample project with database access and some detailed docs.
I also want to mention that Eduardo Pereda has been added to the project to flesh out the Maven2 functionality that I have been neglecting for so long.