mirror of https://github.com/apache/maven.git
o adding some doco about creating archetypes
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307340 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb5f2044b5
commit
c705b3a09c
|
@ -8,6 +8,29 @@
|
|||
|
||||
Guide to Creating Archetypes
|
||||
|
||||
Creating an archetype is a pretty straight forward process. An archetype is simply a JAR file that contains
|
||||
the project prototype you wish to create. You need to create and archetype descriptor and specify the resources
|
||||
that make up the project prototype. An archetype descriptor lists all the files that will be contained in the
|
||||
archetype and categorizes them so they can be processed correctly by the archetype generation mechanism. The
|
||||
archetype descriptor for the quickstart archetype shown in the getting started guide looks like the following:
|
||||
|
||||
+----+
|
||||
|
||||
<archetype>
|
||||
<id>quickstart</id>
|
||||
<sources>
|
||||
<source>src/main/java/App.java</source>
|
||||
</sources>
|
||||
<testSources>
|
||||
<source>src/test/java/AppTest.java</source>
|
||||
</testSources>
|
||||
</archetype>
|
||||
|
||||
+----+
|
||||
|
||||
Once you have the descriptor you need to create the resources for the archetype. Again we will use the quickstart
|
||||
archetype as an example and show the whole directory structure of the archetype project:
|
||||
|
||||
+----+
|
||||
|
||||
archetype
|
||||
|
@ -27,4 +50,13 @@ archetype
|
|||
`-- java
|
||||
`-- AppTest.java
|
||||
|
||||
+----+
|
||||
+----+
|
||||
|
||||
To make the archetype available for use your local system you simply need to execute the following command:
|
||||
|
||||
+----+
|
||||
|
||||
m2 package
|
||||
|
||||
+----+
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
-----
|
||||
Configuring Plug-ins
|
||||
-----
|
||||
Jason van Zyl
|
||||
-----
|
||||
12 Oct 2005
|
||||
|
||||
Configuring Plug-ins
|
||||
|
||||
plugin-level
|
||||
execution-level
|
Loading…
Reference in New Issue