STS Roo, GWT and Maven troubles
Maven can be a good tool for its ends. It certainly has its fair share of sharp edges which can make a bad impression with users. When I was about to work with Maven again, after a long period, I had to find out why it did not run.
I am using STS (SpringSource Tool Suite), built on Eclipse, with Roo included. In order to experiment and learn Roo, I included relearning Maven as well, as it is used in some examples for learning Roo. Well actually, Roo's setup of GWT uses Maven.
The processing of the steps outlined in Roo start went fine.
I started my own project with 4 entities and 2 enums. I figured out some commands to get the enums in. Entering the last commands, the process halted on the 'gwt setup' command. Two error messages were presented (below).
Out of several initiatives, the last one did the trick for me.
I am using STS (SpringSource Tool Suite), built on Eclipse, with Roo included. In order to experiment and learn Roo, I included relearning Maven as well, as it is used in some examples for learning Roo. Well actually, Roo's setup of GWT uses Maven.
- springsource-tool-suite-2.5.0.M3-e3.6-win32-x86_64-installer
- maven-2.2.1.RELEASE (included with this STS)
- roo-1.1.0.M3 (included with this STS)
The processing of the steps outlined in Roo start went fine.
I started my own project with 4 entities and 2 enums. I figured out some commands to get the enums in. Entering the last commands, the process halted on the 'gwt setup' command. Two error messages were presented (below).
- An immidiate message in Roo shell; "Command 'gwt setup' was found but is not currently available (type 'help' then ENTER to learn about this command)". While recognizing the helpful intent, it did alas not give any further clues as to why the command was not available.
- An error dialog named "Error: Updating Maven Configuration" appeared, delayed by STS trying to process the initiated "Updating Maven Configuration".
Out of several initiatives, the last one did the trick for me.
- Set M2, M2_HOME, JAVA_HOME as per Maven installation instructions, and rebooted
- Created a skeletal ~/.m2/settings.xml which was indicated as missing when accessing STS's Window/Preferences/Maven/User Settings
- Used Maven command line utility to verify Maven was working; mvn -v
- Configured a JPA provider and an associated database for Roo to use, simply by issuing the command given by the hint command; persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
- Cleaned ~/.m2 directory and rebuilt it by issuing mvn clean and mvn eclipse:clean eclipse:eclipse
- Some forum message told that the 'gwt setup' command becomes available after a project has been set up using 'project' command. So I set up a new project and it now seems the message 'not available' could mean that it has already been issued. How silly! This error message is nothing to worry about then.