Created Tuesday 27 settembre 2011
Creating a Maven archetype from an existing project is quite easy.
Custom > Goals...,
write in the Goals textfield the archetype:create-from-project goal
and finally click OK. You can also execute the mvn archetype:create-from-project
goal at command line, but be sure to type it from your project template pom directory.target/generated-sources/ directory.
Such an archetype is a Maven project itself but with the packaging type:
<packaging>maven-archetype</packaging>.
mvn clean install.mvn archetype:crawl. Make sure your IDE is aware of the newly created archetype
forcing a re-indexing of your Maven local repository.New Project... > Maven > Project from Archetype, then select your archetype
from the ones listed; or at command line simply run
mvn archetype:generate -DarchetypeCatalog=local.Copyright © 2003, 2012 Tarin Gamberini
Ultimo aggiornamento 01/11/2011