Wednesday, November 22, 2006

 

Maven 1 plugin v 1.0.3 available

The 1.0.3 version of the Maven 1 plugin is available in the repo. To install:

maven plugin:download
-DgroupId=com.totsp.gwt
-DartifactId=maven-googlewebtoolkit-plugin
-Dversion=1.0.3
-Dmaven.repo.remote=http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/

This is a greatly enhanced version of the original. It includes several new features:

goal: gwt:mergewebxml

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:

goal: gwt:war

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!

Also new:

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

-Dgoogle.webtoolkit.extrajvmargs=-XstartOnFirstThread

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.

This page is powered by Blogger. Isn't yours?