Creating a Maven archetype (Struts2/Spring based web application)

February 18, 2009

An archetype in Maven is a template (predefined package structure, resources, configuration files, source files, etc…) which can be used to start the development of a new application.

Amongst various benefits I like the possibility to provide the developers with a set of resources and classes (implementations!) which are going to be needed in the new project. This speeds up the project-setup time and facilitates the adoption of best practises employed within the team.

BTW Maven has few out-of-the-box archetypes (quickstart application, web application, mojo plugin), plus you can find a variety of archetype for lots of frameworks/technology (Struts2, Spring, GWT, etc…).

Here is a list of available archetypes (docs.codehaus.org).

Create a new archetype

The following sections go through the steps of creating a Maven archetype for a web application based on Struts2, Spring and Hibernate (and set of other utilities).

Read the rest of this entry »

Advertisements