JBoss.orgCommunity Documentation
The different runtime models explained here are all incorporated into this maven archetype using profiles. It enables execution in Development Mode and supports both packaging for deployment to a Servlet Engine and the JBoss Application Server.
To begin with we'll create a project layout using a maven build structure, which will provide us with a bare bone project, including all dependencies, which can later on be imported in your IDE of choice.
mvn archetype:generate \ -DarchetypeGroupId=org.jboss.errai.archetypes \ -DarchetypeArtifactId=cdi-quickstart \ -DarchetypeVersion=1.3.0.GA \ -DarchetypeRepository=https://repository.jboss.org/nexus/content/groups/public/
Customize the build properties according to your needs.
Define value for property 'groupId': : foo.bar Define value for property 'artifactId': : gwt-app Define value for property 'version': 1.0-SNAPSHOT: Define value for property 'package': foo.bar: com.foo.bar Confirm properties configuration: groupId: foo.bar artifactId: gwt-app version: 1.0-SNAPSHOT package: com.foo.bar Y:
The project will be created in a directory that corresponds to the provided artifactId.
Now we have a fully working build environment set up in a few, simple steps. You can already use it to launch the GWT development mode or to package your web application for deployment.
mvn gwt:run (launch hosted mode) mvn gwt:debug (launch hosted with debug settings) mvn install (package and install the web application)
To deploy your application to JBoss, 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
The setup instuctions for eclipse can be found in the Errai WIKI .