1. 程式人生 > >MAVEN 建立自己maven archetype

MAVEN 建立自己maven archetype

簡述

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

http://maven.softeu.cz/

JSF+Facelets+Seam Archetype

softeu-archetype-seam-simple

org.apache.maven.archetypes

http://maven.softeu.cz/

JSF+Facelets+Seam (no persistence) Archetype

softeu-archetype-jsf

org.apache.maven.archetypes

http://maven.softeu.cz/

JSF+Facelets Archetype

jpa-maven-archetype

com.rfc.maven.archetypes

http://maven.rodcoffin.com/repo

JPA application

spring-osgi-bundle-archetype

org.springframework.osgi

Spring-OSGi archetype

bamboo-plugin-archetype

com.atlassian.maven.archetypes

3.0.1

https://maven.atlassian.com/public

Atlassian Bamboo plugin archetype

confluence-plugin-archetype

com.atlassian.maven.archetypes

https://maven.atlassian.com/public

Atlassian Confluence plugin archetype

jira-plugin-archetype

com.atlassian.maven.archetypes

3.0.6

https://maven.atlassian.com/public

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

http://scala-tools.org/repo-releases

A simple scala project

lift-archetype-blank

net.liftweb

http://scala-tools.org/repo-releases

A blank/empty liftweb project

lift-archetype-basic

net.liftweb

http://scala-tools.org/repo-releases

The basic (liftweb) project

cocoon-22-archetype-block-plain

org.apache.cocoon

http://cocoon.apache.org/2.2/maven-plugins/

cocoon-22-archetype-block

org.apache.cocoon

http://cocoon.apache.org/2.2/maven-plugins/

cocoon-22-archetype-webapp

org.apache.cocoon

http://cocoon.apache.org/2.2/maven-plugins/

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

http://maven.kungfuters.org/content/repositories/releases

Tellurium JUnit project archetype for the Tellurium Automated Testing Framework

tellurium-testng-archetype

tellurium

http://maven.kungfuters.org/content/repositories/releases

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

Generates a Scalate Jog web application

jrapid-maven-archetype

com.jrapid

1.0

http://jrapidmaven.s3.amazonaws.com/repository\\     Generates a JRapid project.

---------------------  作者:Cabinathor  來源:CSDN  原文:https://blog.csdn.net/lmxmimihuhu/article/details/40483913  版權宣告:本文為博主原創文章,轉載請附上博文連結!