I have created a lot of small applications that include spring and acegi. Most of the time I copy most of the resources from another project. Some time ago I learned about the maven archetypes. An easy way to create the project structure. That was the time I decided that I wanted to have my acegi springframework archetype. Last weeks I found some time to create this archetype. You can download the files here:
And the generated maven site here:
Ofcourse there is also a maven website about creating an archetype, this is not a very extensive website. In this blog item I will explain more about the archetype I created.

First thing to know, well surprise, the archetype is just a maven project. You can start you new archetype by using a maven archetype:
mvn archetype:create
Have a look at the pom for the other properties; scm, distributionManagement, etc.

The project itself contains an src\main\resources\META-INF\maven\archetype.xml file that defines all the resources that need to be copied.


The structure is pretty easy, you can find all the resources under the directory:

You can use the following parameters in your file as placeholders:
http://maven.apache.org/plugins/maven-archetype-plugin/create-mojo.html. Have a look at the src\main\resources\archetype-resources\pom.xml for an example:


Hope that helps you on your way to your own archetype. If you just want to use mine:

mvn install
mvn archetype:create

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>