3.2. Building the application

This step explains building the application. The Sportsclub example uses Maven, so it is built by running:
mvn clean package
This will produce two EAR files, both named sportsclub.ear, located under sportsclub-ear/target and sportsclub-jpa-ear/target. They have the same functionality, but the underlying implementation of the persistence layer is different (one is using Hibernate, and another one uses JPA).

Important

The built application has a profile, messaging, which builds a JMS-enabled variant of the application.
The messaging profile will be used for enabling and disabling JMS integration. When running in environments where messaging is not enabled, like the Web Profile of Red Hat JBoss Enterprise Application Platform (by default standalone.xml configuration file is used), it can be disabled by running:
mvn clean package -P!messaging 
OR
mvn clean package -P-messaging