The GWT Maven module provided with this article gives you a few options for working with the Google Web Toolkit in a Maven project. You will notice in the sample code provided the following set in the project.properties:
google.webtoolkit.home=/home/cooper/local/gwt-linux-1.0.21 google.webtoolkit.runtarget=com.totsp.gwt.Table/Table.html google.webtoolkit.compiletarget=com.totsp.gwt.Table google.webtoolkit.logLevel=DEBUG
The first line is the path to your GWT installation. The second is the target you want the GWTShell to start with when you call the
gwt goal. This will run the shell and open the test browser.
compiletarget is the module declaration you want to use when you call
logLevel is the log level to show in the GWTShell when you are testing. You can look at the Mevenide properties panel in your project properties to see the rest of the settings. They pretty much map one-to-one with the command-line arguments for GWT.
The final target is
Lastly, you want to make sure you have a
gwt:compile executed before your
war:war Maven goal. You can accomplish this by adding in the project
<preGoal name="war:war"> <attainGoal name="gwt:compile"/> </preGoal>
How much would you pay for all this? Well, it is free. However, it is not under any OSI license you might be familiar with. Google has terms available -- basically you are free to use it, but not redistribute it outside your organization. Now, I am no lawyer, but I am seriously troubled by this clause, however:
you may not distribute Google Web Toolkit Development Tools or any services or software associated with or derived from them, or modify, copy, license, or create derivative works from Google Web Toolkit Development Tools, unless you obtain Google's written permission in advance.
One thing that GWT seems built to do is allow people to build new and interesting components. Indeed, when I first saw it, it screamed "whole new community" of GWT-based widgets. It would seem to me, however, that this is forbidden as a derivative work. It is also worth noting an interesting part of the privacy notice on the download page:
Privacy notice: When you use the Google Web Toolkit's hosted web browser, the application sends a request back to Google's servers to check to see if you are using the most recent version of the product. As a part of this request, Google will log usage data including a timestamp of the date and time you downloaded the Google Web Toolkit and the IP address for your computer.
- Sample code for this article
- The Maven plugin for use with GWT
- The Google-Web-Toolkit group on Google Groups
- The GWT Team Blog
- The GWT Home Page
Robert Cooper is an independent Java developer in the Atlanta area, working with J2EE technologies and web/web service projects.
Return to ONJava.com.
Maven Gwt Plugin
2007-11-30 04:34:47 jaepo [View]
One more tutorial on GWT
2006-06-28 01:16:15 AlexTkachman [View]
Sample code uses ,,\sample in the zip
2006-06-05 03:43:26 malcolmd [View]
Terms and Conditions
2006-06-04 14:42:20 roberthanson1 [View]
2006-06-02 04:22:48 amphora [View]