Building a custom archetype
So far in this chapter, we have discussed several applications of Maven archetypes. It's high time now to build our own custom archetype. Let's see how to develop a Maven archetype for an Apache Axis2 module/handler. Let's start with a simple Maven project:
$ mvn archetype:generate -DgroupId=com.packt.axis2 -DartifactId=com.packt.axis2.archetype.handler -Dversion=1.0.0 -Dpackage=com.packt.axis2.archetype.handler -DinteractiveMode=false
This command will generate the following directory structure:
com.packt.axis2.archetype.handler |-pom.xml |-src |-main/java/com/packt/axis2/archetype/handler/App.java |-test/java/com/packt/axis2/archetype/handler/AppTest.java
Before creating the archetype, first we need to build the ...
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.