Maven provides support to generate Java EE Enterprise Archive (EAR) files. These can be deployed in application servers such as JBoss, WebLogic, and WebSphere.
mvn archetype:generate -DgroupId=com.packt.cookbook -DartifactId=simple-ear -DarchetypeArtifactId=wildfly-javaee7-webapp-ear-archetype -DarchetypeGroupId=org.wildfly.archetype -DinteractiveMode=false
mvn clean package
target
folder:We used the Maven Archetype plugin to bootstrap a simple EAR project. It generated a multi-module project, which has an EJB module, web module, and a EAR module along with the aggregate pom file. When you examine the pom
file of the EAR module, you will notice that the packaging
type is set to ear
.
Once built, Maven builds all the modules. In the EAR module, it uses the packaging information to invoke the ear
goal of the Maven EAR plugin to create a EAR of the project contents.
13.59.197.213