GWT Build and Debug Tips
Upgrade to Latest Nightly Build of SmartGWT
To upgrade to the latest 2.5 nightly:
wget http:rm ~/.m2/repository/com/smartgwt/smartgwt/2.4/smartgwt-2.4.jar*
cp smartgwt-2.0-SNAPSHOT.jar ~/.m2/repository/com/smartgwt/smartgwt/2.4/smartgwt-2.4.jar
# rebuild coregui.war then restart RHQ Server
To switch back to 2.4:
rm ~/.m2/repository/com/smartgwt/smartgwt/2.4/smartgwt-2.4.jar
# rebuild coregui.war then restart RHQ Server
Build a SmartGWT Webapp for a Bug Reproduction Test Case
First build the smartgwt-war archetype:
cd RHQ/etc/m2/smartgwt-war-archetype
mvn install archetype:update-local-catalog
Then generate a SmartGWT WAR project from the archetype:
cd /tmp
mvn archetype:generate -DarchetypeGroupId=org.rhq.maven -DarchetypeArtifactId=smartgwt-war-archetype
Answer the prompts for project property values, then hit Enter to confirm those values, e.g.:
Define value for property 'groupId': : test
Define value for property 'artifactId': : smartgwtWar
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': test: :
Confirm properties configuration:
groupId: test
artifactId: smartgwtWar
version: 1.0-SNAPSHOT
package: test
Y: :
Build the newly created project to produce a SmartGWT WAR:
cd /tmp/smartgwtWar
mvn install -Dmaven.test.skip=true
Fire up the dev mode Jetty server and go to your newly built SmartGWT webapp in Firefox or in another browser that has a GWT dev plugin available for it.
mvn gwt:run
firefox http:
If you see the words "Hello world!" on the page loaded by the browser, the webapp built successfully - now you can modify it to suit your needs. Typically, you should start out by editing src/main/test/java/foo/ApplicationTestCase.java.