This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Can't compile with GWT 2.4

Oct 29th, 2011, 05:39 PM

I've scoured the net and have done everything I can think of to convert the Roo expenses sample to GWT 2.4 and it simply won't work. The problem I'm experiencing is with the new 2.4 Request Factory annotation validation. I'm detailing all of my steps here. Please comment if you've been able to run a Roo generated project with 2.4 + request factory - I'm starting to think that it might not be possible.

Toolchain: STS 2.7.2, GWT 2.4, Maven 2.2.1, m2e 1.0, Roo 1.2.0.M1

First I updated all the GWT dependencies in my pom.xml to use 2.4 instead of the 2.3 that is automatically used by the scaffolded expenses application.

I then re-factored all of the RequestFactory references to use the new web.bindery packages.

This included downloading the m2e connector for build-helper-maven-plugin and adding the following to my pom.xml:
<!-- requestfactory-apt runs an annotation processor (APT) to
instrument its service interfaces so that
RequestFactoryServer can decode client requests. Normally
you would just have a dependency on requestfactory-apt
with <scope>provided</scope>, but that won't work in
eclipse due to m2e bughttps://bugs.eclipse.org/bugs/show_bug.cgi?id=335036 -->
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-apt</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-server</artifactId>
<version>2.4.0</version>
</dependency>
</dependencies>
</plugin>

I even enabled the annotation processing through the IDE (I think it would be great to get integrated errors when the RequestFactory implementations aren't correct)

Another thing I had to do to my pom.xml was make sure I was pulling in the sources for javax validation:
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>

Comment

I still have not been able to make progress on this issue. I'm about ready to start from scratch. I've already tried creating a new expenses sample with Roo 1.2M1 and it has build problems out of the box. Can somebody pleeeease list a recipe for generating a buildable sample project with GWT 2.4? Roo is after all supposed to be able to generate projects that work out of the box without hours of tampering right? It seems that Roo was never able to deliver on this promise with GWT 2.4. Or maybe it's just difficult to test with all of the different tools available.

At this point, I'm willing to use whatever tools I need to. If anybody has been successful in creating a buildable Roo sample expenses application with GWT 2.4 please tell us your recipe.

Specifically:
- IDE (w/version)
- Roo version
- Maven version
- Additional plugins (lifecycle management stuff?)
- If the process you followed was different than the process for creating a sample project in the documentation, please list the differences

Thank you so much! I can't wait to get back to developing this project.