JBoss Community Archive (Read Only)

RHQ 4.9

GWT Build and Debug Tips

Upgrade to Latest Nightly Build of SmartGWT

With previous versions ( prior to 3.0) of SmartGWT, nightly builds were available in the SmartClient Maven repo. That is not the case however, with 3.0 builds. To upgrade to the latest nightly 3.0 patch build:

  • Go to nightly 3.0p builds and click on the latest date listed.

  • Download the smartgwt.jar file.

  • rm ~/.m2/repository/com/smartgwt/smartgwt/3.0/smartgwt-3.0.jar*

  • cp smartgwt.jar ~/.m2/repository/com/smartgwt/smartgwt/3.0/smartgwt-3.0.jar

  • rebuild coregui.war and then restart RHQ server

To switch back to 3.0:

rm ~/.m2/repository/com/smartgwt/smartgwt/3.0/smartgwt-3.0.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://127.0.0.1:8888/test.Application/Application.html?gwt.codesvr=127.0.0.1:9997

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.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 08:20:18 UTC, last content change 2013-09-18 19:40:41 UTC.