EJB archives with the archetype plugin

Here, we will discuss how to create a Maven Enterprise JavaBeans (EJB) project using the ejb-javaee6 archetype developed by Codehaus, which is a collaborative environment for building open source projects:

$ mvn archetype:generate -B
                  -DgroupId=com.packt.samples
                  -DartifactId=my-ejbapp
                  -Dpackage=com.packt.samples.ejbapp
                  -Dversion=1.0.0
                  -DarchetypeGroupId=org.codehaus.mojo.archetypes
                  -DarchetypeArtifactId=ejb-javaee6
                  -DarchetypeVersion=1.5

The previous command produces the following skeleton project. You can create your EJB classes inside src/main/java/com/packt/samples/ejbapp/:

my-ejbapp
      |-pom.xml
      |-src/main/java/com/packt/samples/ejbapp/
      |-src/main/resources/META-INF/MANIFEST.MF

If you look at the following ...

Get Mastering Apache Maven 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.