JBoss.orgCommunity Documentation
In order to get you going quickly, we've provided a project archetype, that allows you to create a project skeleton similiar to the one we use for building the examples. It's based on the maven archetype plugin http://maven.apache.org/plugins/maven-archetype-plugin/ and needs to be invoked from the command line:
mvn archetype:generate \ -DarchetypeGroupId=org.jboss.errai.archetypes \ -DarchetypeArtifactId=bus-quickstart \ -DarchetypeVersion=2.0.Beta1 \ -DarchetypeRepository=https://repository.jboss.org/nexus/content/groups/public/
When invoking the archetype build you will be asked to provide the maven groupId, artifactId and package name your GWT application should use:
Define value for groupId: : foo.bar Define value for artifactId: : gwt-app Define value for version: 1.0-SNAPSHOT: : Define value for package: foo.bar: : foo.bar.ui Confirm properties configuration: groupId: foo.bar artifactId: gwt-app version: 1.0-SNAPSHOT package: foo.bar.ui Y: :
You will be left with a maven build structure, including references to the GWT SDK and the Errai dependencies necessary to build, test, package, and launch a simple application.
To launch the GWT development mode, change into the project directory (name corresponding to the provided artifactId) and type:
mvn gwt:run
The example application also comes with an integration test suite that exercises most of its client-side and server-side code. To run the test suite, type:
mvn test -Pintegration-test
To generate a set of HTML documents under target/site/jacoco/ detailing code coverage of the most recent test run, type:
mvn site
By default the archetype does package the web application for Development Mode execution. To deploy your application to JBoss AS 7, you need to execute a clean rebuild using the JBoss profile (e.g.
-Pjboss7
).
mvn -Pjboss7 clean install cp target/gwt-app.war $JBOSS_HOME/standalone/deployments