blob: e18fdb6cff6977bfb420a56620ed58f165605b44 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
xml.namespace="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/${version}"
xml.schemaLocation="http://maven.apache.org/xsd/archetype-descriptor-${version}.xsd">
<id>archetype-descriptor</id>
<name>ArchetypeDescriptor</name>
<description>
<![CDATA[
<p>This is a reference for the Archetype descriptor used to describe archetypes's metadata.</p>
<p>The metadata about an archetype is stored in the <code>archetype-metadata.xml</code> file located
in the <code>META-INF/maven</code> directory of its jar file.</p>]]>
</description>
<defaults>
<default>
<key>package</key>
<value>org.apache.maven.archetype.metadata</value>
</default>
</defaults>
<classes>
<class rootElement="true" xml.tagName="archetype-descriptor">
<name>ArchetypeDescriptor</name>
<superClass>AbstractArchetypeDescriptor</superClass>
<fields>
<field xml.attribute="true">
<name>name</name>
<type>String</type>
<required>true</required>
<description>Name of the Archetype, that will be displayed to the user when choosing an archetype.</description>
</field>
<field xml.attribute="true">
<name>partial</name>
<type>boolean</type>
<required>false</required>
<description>Is this archetype representing a full Maven project or only parts?</description>
</field>
<field>
<name>requiredProperties</name>
<description>List of required properties to generate a project from this archetype.</description>
<association>
<type>RequiredProperty</type>
<multiplicity>*</multiplicity>
</association>
</field>
</fields>
</class>
<class>
<name>ModuleDescriptor</name>
<superClass>AbstractArchetypeDescriptor</superClass>
<fields>
<field xml.attribute="true">
<name>id</name>
<type>String</type>
<required>true</required>
<description>The module's artifactId.</description>
</field>
<field xml.attribute="true">
<name>dir</name>
<type>String</type>
<required>true</required>
<description>The module's directory.</description>
</field>
<field xml.attribute="true">
<name>name</name>
<type>String</type>
<required>true</required>
<description>The module's name.</description>
</field>
</fields>
</class>
<class>
<name>AbstractArchetypeDescriptor</name>
<fields>
<field xdoc.separator="blank">
<name>fileSets</name>
<association>
<type>FileSet</type>
<multiplicity>*</multiplicity>
</association>
<required>true</required>
<description>File sets definition.</description>
</field>
<field xdoc.separator="blank">
<name>modules</name>
<association>
<type>ModuleDescriptor</type>
<multiplicity>*</multiplicity>
</association>
<required>false</required>
<description>Modules definition.</description>
</field>
</fields>
</class>
<class>
<name>FileSet</name>
<description><![CDATA[
A fileset defines the way the project's files located in the jar file are used by the Archetype Plugin to generate a project.
If file or directory name contains <code>__<i>property</i>__</code> pattern, it is replaced with corresponding property value.
]]></description>
<fields>
<field xml.attribute="true">
<name>filtered</name>
<type>boolean</type>
<required>false</required>
<description><![CDATA[
Filesets can be filtered, which means the selected files will be used as
<a href="http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html">Velocity templates</a>.
They can be non-filtered, which means the selected files will be copied without modification.
]]></description>
</field>
<field xml.attribute="true">
<name>packaged</name>
<type>boolean</type>
<required>false</required>
<description>Filesets can be packaged, which means the selected files will be generated/copied in a directory
structure that is prepended by the package property. They can be non-packaged, which means that the selected
files will be generated/copied without that prepend.</description>
</field>
<field xml.attribute="true">
<name>encoding</name>
<type>String</type>
<required>false</required>
<description>Encoding to use when filtering content.</description>
</field>
<field>
<name>directory</name>
<type>String</type>
<required>true</required>
<description>The directory where the files will be searched for, which is also the directory where the
project's files will be generated.</description>
</field>
<field>
<name>includes</name>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
</association>
<required>false</required>
<description>Inclusion definition "à la" Ant.</description>
</field>
<field>
<name>excludes</name>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
</association>
<required>false</required>
<description>Exclusion definition "à la" Ant.</description>
</field>
</fields>
<codeSegments>
<codeSegment>
<code><![CDATA[
public String toString()
{
return
getDirectory() + " ("
+ ( isFiltered() ? "Filtered" : "Copied" )
+ "-"
+ ( isPackaged() ? "Packaged" : "Flat" )
+ ") ["
+ org.codehaus.plexus.util.StringUtils.join( getIncludes().iterator(), ", " )
+ " -- "
+ org.codehaus.plexus.util.StringUtils.join( getExcludes().iterator(), ", " )
+ "]";
}
]]></code>
</codeSegment>
</codeSegments>
</class>
<class>
<name>RequiredProperty</name>
<description>Definition of a property required when generating a project from this archetype.</description>
<fields>
<field xml.attribute="true">
<name>key</name>
<type>String</type>
<required>true</required>
<description>Key value of the property.</description>
</field>
<field>
<name>defaultValue</name>
<type>String</type>
<required>false</required>
<description>Default value of the property.</description>
</field>
</fields>
</class>
</classes>
</model>