from : http://blog.csdn.net/yaowj2/article/details/6794129
http://docs.codehaus.org/display/MAVENUSER/Archetypes+List
简述
maven archetype 是一个原型构建框架,这样可以把一些重复性的配置代码放到archetype里,不用每次都从头去搭建项目。下面总结一下创建archetype的几个步骤
内容
一 mvn archetype:genetate 创建一个标准的maven工程
添加自己想要重复利用的元素,如一些配置,通用代码等。
二 在工程下执行mvn archetype:create-from-project
此时会生成 target/generated-sources/archetype
进入archetype目录下,执行mvn install
三 此时 mvn archetype:genetate时就可以选择自己的archetype进行创建了
当然,本地的 archetypeCatolog一般为local,所以可以这样:mvn archetype:genetate -DarchetypeCatalog=local,再选择catalog下具体的archetype
四 下面是已有的archetype
Quick Reference
A quick reference of available archetypes and their repositories. This list is designed so it can be automatically retrieved from archetype front-ends such as Archy - http://code.google.com/p/archy, or by Maven Archetype tools to generate Maven Archetype Plugin internal
catalog.
Only archetypes that don't have any "released" artifacts need a version number. Only archetypes that are not available on Maven central
repository need a repository value.
Artifact |
Group |
Version |
Repository |
Description |
---|---|---|---|---|
appfuse-basic-jsf | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a web application with Hibernate, Spring and JSF |
appfuse-basic-spring | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC |
appfuse-basic-struts | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2 |
appfuse-basic-tapestry | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4 |
appfuse-core | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a jar application with Hibernate and Spring and XFire |
appfuse-modular-jsf | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a modular application with Hibernate, Spring and JSF |
appfuse-modular-spring | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a modular application with Hibernate, Spring and Spring MVC |
appfuse-modular-struts | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a modular application with Hibernate, Spring and Struts 2 |
appfuse-modular-tapestry | org.appfuse.archetypes | 2.0 |
| AppFuse archetype for creating a modular application with Hibernate, Spring and Tapestry 4 |
makumba-archetype | org.makumba |
|
| Archetype for a simple Makumba application |
maven-archetype-j2ee-simple | org.apache.maven.archetypes |
|
| A simple J2EE Java application |
maven-archetype-marmalade-mojo | org.apache.maven.archetypes |
|
| A Maven plugin development project using marmalade |
maven-archetype-plugin | org.apache.maven.archetypes |
|
| A Maven Java plugin development project |
maven-archetype-portlet | org.apache.maven.archetypes |
|
| A simple portlet application |
maven-archetype-profiles | org.apache.maven.archetypes |
|
|
|
maven-archetype-quickstart | org.apache.maven.archetypes |
|
|
|
maven-archetype-simple | org.apache.maven.archetypes |
|
|
|
maven-archetype-site-simple | org.apache.maven.archetypes |
|
| A simple site generation project |
maven-archetype-site | org.apache.maven.archetypes |
|
| A more complex site project |
maven-archetype-webapp | org.apache.maven.archetypes |
|
| A simple Java web application |
data-app | net.databinder | 1.0 |
| A new Databinder application with sources and resources. |
camel-archetype-component | org.apache.camel.archetypes |
|
| Creates a new Camel component |
camel-archetype-activemq | org.apache.camel.archetypes |
|
| Creates a new Camel project that configures and interacts with ActiveMQ |
camel-archetype-java | org.apache.camel.archetypes |
|
| Creates a new Camel project using Java DSL |
camel-archetype-scala | org.apache.camel.archetypes |
|
| Creates a new Camel project using Scala DSL |
camel-archetype-spring | org.apache.camel.archetypes |
|
| Creates a new Camel project with added Spring DSL support |
camel-archetype-war | org.apache.camel.archetypes |
|
| Creates a new Camel project that deploys the Camel Web Console, REST API, and your routes as a WAR |
jini-service-archetype | org.jini.maven-jini-plugin | 2.0 |
| Archetype for Jini service project creation |
jbosscc-seam-archetype | de.akquinet.jbosscc | 1.3 |
| Maven Archetype to generate a Seam Application - running on JBoss AS 7 - Documentation |
jbosscc-javaee6-modular-ear-archetype | de.akquinet.jbosscc | Maven Archetype to generate a modular Java EE 6 based project skeleton. - Documentation | ||
softeu-archetype-seam | org.apache.maven.archetypes |
| JSF+Facelets+Seam Archetype | |
softeu-archetype-seam-simple | org.apache.maven.archetypes |
| JSF+Facelets+Seam (no persistence) Archetype | |
softeu-archetype-jsf | org.apache.maven.archetypes |
| JSF+Facelets Archetype | |
jpa-maven-archetype | com.rfc.maven.archetypes |
| JPA application | |
spring-osgi-bundle-archetype | org.springframework.osgi |
|
| Spring-OSGi archetype |
bamboo-plugin-archetype | com.atlassian.maven.archetypes | 3.0.1 | Atlassian Bamboo plugin archetype | |
confluence-plugin-archetype | com.atlassian.maven.archetypes |
| Atlassian Confluence plugin archetype | |
jira-plugin-archetype | com.atlassian.maven.archetypes | 3.0.6 | Atlassian JIRA plugin archetype | |
maven-archetype-har | net.sf.maven-har | 0.9 |
| Hibernate Archive |
maven-archetype-sar | net.sf.maven-sar | 0.9 |
| JBoss Service Archive |
wicket-archetype-quickstart | org.apache.wicket | 1.3.2 |
| A simple Apache Wicket project |
quickstart | org.apache.tapestry |
|
| A simple Apache Tapestry 5 Project |
scala-archetype-simple | org.scala-tools.archetypes | 1.2 | A simple scala project | |
lift-archetype-blank | net.liftweb |
| A blank/empty liftweb project | |
lift-archetype-basic | net.liftweb |
| The basic (liftweb) project | |
cocoon-22-archetype-block-plain | org.apache.cocoon |
|
| |
cocoon-22-archetype-block | org.apache.cocoon |
|
| |
cocoon-22-archetype-webapp | org.apache.cocoon |
|
| |
myfaces-archetype-helloworld | org.apache.myfaces.buildtools | 1.0.0 |
| A simple archetype using MyFaces |
myfaces-archetype-helloworld-facelets | org.apache.myfaces.buildtools | 1.0.0 |
| A simple archetype using MyFaces and facelets |
myfaces-archetype-trinidad | org.apache.myfaces.buildtools | 1.0.0 |
| A simple archetype using Myfaces and Trinidad |
myfaces-archetype-jsfcomponents | org.apache.myfaces.buildtools | 1.0.0 |
| A simple archetype for create custom JSF components using MyFaces |
gmaven-archetype-basic | org.codehaus.gmaven.archetypes |
|
| Groovy basic archetype |
gmaven-archetype-mojo | org.codehaus.gmaven.archetypes |
|
| Groovy mojo archetype |
struts2-archetype-starter | org.apache.struts |
|
| Struts 2 Starter Archetype |
tynamo-archetype | org.tynamo |
|
| Creates a CRUD web application based on Tapestry 5 and Tynamo, a model-driven Java web framework |
tellurium-junit-archetype | tellurium |
| Tellurium JUnit project archetype for the Tellurium Automated Testing Framework | |
tellurium-testng-archetype | tellurium |
| Tellurium TestNG project archetype for the Tellurium Automated Testing Framework | |
scalate-archetype-empty | org.fusesource.scalate.tooling |
|
| Generates a Scalate empty web application |
scalate-archetype-guice | org.fusesource.scalate.tooling |
|
| |
jrapid-maven-archetype | com.jrapid | 1.0 | http://jrapidmaven.s3.amazonaws.com/repository\\ | Generates a JRapid project. |
from :
http://blog.csdn.net/yaowj2/article/details/6794129
http://docs.codehaus.org/display/MAVENUSER/Archetypes+List