Getting started with the Maven archetype
Creating new Java projects from scratch can be a bit tortuous as you have to
provide the right component, some initial code and some way of building
it. Using Maven these problems can all be resolved so that starting a new
project is exceptionally easy process. Specifically it will create a new
set of directories and files, add in the build definitions and ensure all
the dependent resources are available. This is the work of the Maven
Archetype plugin.
Naked Objects uses the feature of Maven to create new Naked Object
application in a couple of commands. What I am going to describe now is
the same as for other Maven archetype, the only additional task is to
specify where the archetype is to be found. We maintain that catalog on
our website so to build a application from scratch type in the following
(assuming that you have Maven 2.1 or 2.2 installed, see
http://maven.apache.org/download.html).
$ mvn archetype:generate -DarchetypeCatalog=http://nakedobjects.org
You will then be prompted with a list of archetypes (at time of
writing there is only one).
Comments(0)