Maven's model for the old archetype descriptor (ie for Archetype 1.0.x).
The metadata about an archetype is stored in the archetype.xml file located in the META-INF/maven directory of its jar file.
<archetype xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"> <id/> <allowPartial/> <sources> <source encoding=.. /> </sources> <resources> <resource encoding=.. filtered=.. /> </resources> <testSources> <source encoding=.. /> </testSources> <testResources> <resource encoding=.. filtered=.. /> </testResources> <siteResources> <resource encoding=.. filtered=.. /> </siteResources> </archetype>
Describes the assembly layout and packaging.
Element | Type | Description |
---|---|---|
id | String | The value should be the same as the artifactId in the archetype pom.xml. |
allowPartial | boolean | Setting this option to true makes it possible to run the
archetype:create even on existing projects. Default value is: false. |
sources/source* | List<Source> | (Many) Files that will go into src/main/java. |
resources/resource* | List<Resource> | (Many) Files that will go into src/main/resources. |
testSources/source* | List<Source> | (Many) Files that will go into src/test/java. |
testResources/resource* | List<Resource> | (Many) Files that will go into src/test/resources. |
siteResources/resource* | List<Resource> | (Many) Files that will go into src/site. |
Describes a source file. Note that source files are always filtered, unlike resources that can be non-filtered.
Element Content: The source file.
Attribute | Type | Description |
---|---|---|
encoding | String | The encoding to be used when reading/writing this file. Platform encoding is used by default, or ISO-8859-1 when filename ends in .properties |
Describes a resource file.
Element Content: The resource file.
Attribute | Type | Description |
---|---|---|
encoding | String | The encoding to be used when reading/writing this file. Platform encoding is used by default, or ISO-8859-1 when filename ends in .properties |
filtered | boolean | A resource can be filtered, which means the file will be used as Velocity template.
It can be non-filtered, which means the file will be copied without modification. Default value is: true. |