O'Reilly logo

Maven Essentials by Prabath Siriwardena

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 to build 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required