Friday, 23 September 2011

Maven and RequestFactory in GWT 2.4

  GWT 2.4 introduced changes to both Maven and RequestFactory, and we've recently updated the GWT wiki and sample apps with the latest and greatest: RequestFactory now does compile-time validation to ensure that your service implementations match your client-side interfaces. This feature is implemented using an annotation processor which must be configured in Eclipse or in your Maven POM. When configured in Eclipse, you will now see warnings and errors in the IDE anywhere your client- and server-side RF code don't match. In addition, the RequestFactory jars are now in Maven Central. Note that the Maven groupId for RF artifacts differs from the rest of the GWT artifacts since RF can be used in Android clients as well as GWT. If you're using RequestFactory instead of GWT-RPC, you no longer need gwt-servlet. Instead, you can use the much smaller requestfactory-server jar and requestfactory-apt (which contains the RF interface validation tool). You do not need requestfactory-client for GWT projects as the required classes are already included in gwt-user. The requestfactory-client jar is intended for non-GWT (Android) clients using RequestFactory.
The mobilewebapp and dynatablerf samples show everything working together and have been tested in Eclipse 3.6 and 3.7. If you also have the Eclipse Subversive plugin installed (see, you should be able to try the mobilewebapp sample as easily as
  1. File > Import > Checkout Maven projects from SCM, point to
  2. Run as > Web application

No comments:

Post a comment

Share This Post