Affects Version/s: 1.2.1.RELEASE
Fix Version/s: 1.2.4.RELEASE
Component/s: @ RESOURCES
Environment:Replicated on two environments:
1. Windows 7 host, JDK 1.6,0_25, Maven 3.0.4, Spring Roo 1.2.1 Release, GWT 2.4.0
2. Ubuntu 10.04 VirtualBox guest , JDK 1.6..0_26, Maven 3.0.4, Spring Roo 1.2.1 Release, GWT 2.4.0
The "First Project - Roo Standalone" example on the Roo homepage is out of date and does not work.
I am a complete n00b to Spring Roo and just tried it out today for the first time. I followed the "First Project - Roo Standalone" instructions as shown on the homepage and was very disappointed to see that it failed on the last step ("roo> perform tests").
The error I received was as follows:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (default) on project foo: Command execution failed. Process exited with an error: -1(Exit value: -1) -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Attempting to run "mvn test" from the command line yielded the following error:
error: Could not find root type com.foo.client.managed.request.ApplicationRequestFactory
The ApplicationRequestFactory.java file did not exist.
As I am a n00b to both Roo and GWT, I spent a lot of trawling through the forums (wihout much success) as I found very similar problems around GWT 2.4 and Roo but none of which solved this issue for me.
I eventually came across some documentation on http://static.springsource.org/spring-roo/reference/html/base-gwt.html - it told me which files I should have after running the "gwt setup" command but they weren't present in my directory structure. The GWT documentation page in the Roo reference seems to be out of date/incorrect as well.
Figure 14.2 in the GWT page in the Roo reference shows the file which I needed to fix my problem but it doesn't do a good job at explaining how it got there (the documentation only mentions generating the *Proxy and *Request classes and the diagram highlights them as such).
After looking through the command index (http://static.springsource.org/spring-roo/reference/html/command-index.html), I found the one and only fully correct explanation of the GWT commands:
A.13.2. web gwt all
Locates all entities in the project and creates GWT requests, proxies and _(MOST IMPORTANTLY)_ creates the scaffold
web gwt all --proxyPackage --requestPackage
The package in which created proxies will be placed; no default value (mandatory)
The package in which created requests will be placed; no default value (mandatory)
Heading back into the Roo console, I typed in:
web gwt all --proxyPackage com.foo.client.request --requestPackage com.foo.client.request
And then all the required files were created. Thereafter, running "roo> perform tests" worked perfectly.
Having not created the scaffold probably seems like a ridiculously simple issue to experienced Roo users, but for someone like me with no prior Roo experience who was just trying to get the most basic example from the homepage working it was not a simple solution.
Please can someone update the example (on the homepage) to include the command to create the GWT scaffold and ideally update the GWT reference page to correctly display the files generated by "gwt setup" vs. "web gwt all".