| <?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="https://codehaus-plexus.github.io/MODELLO/1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="https://codehaus-plexus.github.io/MODELLO/1.4.0 https://codehaus-plexus.github.io/modello/xsd/modello-1.4.0.xsd" |
| xml.namespace="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/${version}" |
| xml.schemaLocation="http://maven.apache.org/xsd/archetype-catalog-${version}.xsd"> |
| <id>archetype-catalog</id> |
| <name>ArchetypeCatalog</name> |
| <description> |
| <![CDATA[ |
| <p>This is a reference for the Archetype Catalog descriptor.</p> |
| <p>These are standard catalog files which contain information about Archetypes so that users |
| can be presented with a list of archetypes from any number of catalogs to generate new |
| projects.</p> |
| <p>The Archetype Plugin knows by default its internal catalog. It also knows |
| about the <code>local</code> and <code>remote</code> catalogs:</p> |
| <ul> |
| <li><code>local</code> represents the <code>~/.m2/archetype-catalog.xml</code> catalog file,</li> |
| <li><code>remote</code> represents the <code>https://repo.maven.apache.org/maven2/archetype-catalog.xml</code> catalog file.</li> |
| </ul> |
| <p>The Archetype Plugin can also read catalogs from filesystem/HTTP by providing the path/URL of a catalog file or |
| of a directory containing an <code>archetype-catalog.xml</code> file.</p>]]> |
| </description> |
| |
| <defaults> |
| <default> |
| <key>package</key> |
| <value>org.apache.maven.archetype.catalog</value> |
| </default> |
| </defaults> |
| |
| <classes> |
| <class rootElement="true" xml.tagName="archetype-catalog"> |
| <name>ArchetypeCatalog</name> |
| <fields> |
| <field> |
| <name>archetypes</name> |
| <association> |
| <type>Archetype</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| <description>List of Acthetypes available in this catalog.</description> |
| </field> |
| </fields> |
| <codeSegments> |
| <codeSegment> |
| <code><![CDATA[ |
| public String toString() |
| { |
| return archetypes.toString(); |
| } |
| ]]></code> |
| </codeSegment> |
| </codeSegments> |
| </class> |
| |
| <class> |
| <name>Archetype</name> |
| <description>Informations to point to an Archetype referenced in the catalog.</description> |
| <fields> |
| <field> |
| <name>groupId</name> |
| <type>String</type> |
| <required>true</required> |
| <description>The groupId of the archetype.</description> |
| </field> |
| <field> |
| <name>artifactId</name> |
| <type>String</type> |
| <required>true</required> |
| <description>The artifactId of the archetype.</description> |
| </field> |
| <field> |
| <name>version</name> |
| <type>String</type> |
| <required>true</required> |
| <description><![CDATA[The version of the archetype. <code>RELEASE</code> is a valid version.]]></description> |
| </field> |
| <field> |
| <name>repository</name> |
| <type>String</type> |
| <required>false</required> |
| <description>The URL of the repository where to find the archetype. |
| When omitted, the archetype is searched for in the repository where the catalog comes from.</description> |
| <annotations> |
| <annotation>@Deprecated</annotation> |
| </annotations> |
| </field> |
| <field> |
| <name>description</name> |
| <type>String</type> |
| <required>false</required> |
| <description>The description of the archetype.</description> |
| </field> |
| <field xml.transient="true"> |
| <name>goals</name> |
| <description>Goals to execute after the creation of the project.</description> |
| <association> |
| <type>String</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| </field> |
| <field xml.transient="true"> |
| <name>properties</name> |
| <description> |
| Properties that will be used during the execution of addition goals after the creation of the project. |
| </description> |
| <type>Properties</type> |
| <association xml.mapStyle="inline"> |
| <type>String</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| </field> |
| </fields> |
| <codeSegments> |
| <codeSegment> |
| <code><![CDATA[ |
| public String toString() |
| { |
| return "[" + groupId + ":" + artifactId + ":" + version + ( repository != null ? " -> " + repository : "" ) + "]"; |
| } |
| public int hashCode() |
| { |
| return groupId.hashCode() + 17 * artifactId.hashCode(); |
| } |
| public boolean equals( Object object ) |
| { |
| if ( object == null || !( object instanceof Archetype ) ) |
| { |
| return false; |
| } |
| else |
| { |
| Archetype a = (Archetype) object; |
| return org.codehaus.plexus.util.StringUtils.equals( groupId, a.getGroupId() ) |
| && org.codehaus.plexus.util.StringUtils.equals( artifactId, a.getArtifactId() ); |
| } |
| } |
| ]]></code> |
| </codeSegment> |
| </codeSegments> |
| </class> |
| </classes> |
| </model> |