Author: cstamas
Date: Fri Nov 19 13:37:58 2010
New Revision: 1036834

URL: http://svn.apache.org/viewvc?rev=1036834&view=rev
Log:
ARCHETYPE-303: applied fix, externalizing all the models into separate project 
(except the deprecated one, that is left where it was).

Note: Before applying this change, there was test failures in archetype-common 
module (see below). But since this change is actually just moving/shuffling 
models around (no code change involved), it simply retained this fact, hence 
that same test still fails.

Tests in error: 
  
testArchetyper(org.apache.maven.archetype.test.ArchetyperRoundtripWithProxyTest)

-------------------------------------------------------------------------------
Test set: org.apache.maven.archetype.test.ArchetyperRoundtripWithProxyTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 91.745 sec <<< 
FAILURE!
testArchetyper(org.apache.maven.archetype.test.ArchetyperRoundtripWithProxyTest)
  Time elapsed: 91.738 sec  <<< ERROR!
org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype 
does not exist (org.apache.maven.test:test-project-2:1.0)
        at 
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.getArchetypeFile(DefaultArchetypeGenerator.java:88)
        at 
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:207)
        at 
org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultArchetypeManager.java:71)
        at 
org.apache.maven.archetype.test.ArchetyperRoundtripWithProxyTest.testArchetyper(ArchetyperRoundtripWithProxyTest.java:193)


Added:
    maven/archetype/trunk/archetype-models/   (with props)
    maven/archetype/trunk/archetype-models/archetype-catalog/   (with props)
    maven/archetype/trunk/archetype-models/archetype-catalog/pom.xml
    maven/archetype/trunk/archetype-models/archetype-catalog/src/
    maven/archetype/trunk/archetype-models/archetype-catalog/src/main/
    maven/archetype/trunk/archetype-models/archetype-catalog/src/main/mdo/
    
maven/archetype/trunk/archetype-models/archetype-catalog/src/main/mdo/archetype-catalog.mdo
    maven/archetype/trunk/archetype-models/archetype-descriptor/   (with props)
    maven/archetype/trunk/archetype-models/archetype-descriptor/pom.xml
    maven/archetype/trunk/archetype-models/archetype-descriptor/src/
    maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/
    maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/mdo/
    
maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/mdo/archetype-descriptor.mdo
    maven/archetype/trunk/archetype-models/archetype-registry/   (with props)
    maven/archetype/trunk/archetype-models/archetype-registry/pom.xml
    maven/archetype/trunk/archetype-models/archetype-registry/src/
    maven/archetype/trunk/archetype-models/archetype-registry/src/main/
    maven/archetype/trunk/archetype-models/archetype-registry/src/main/mdo/
    
maven/archetype/trunk/archetype-models/archetype-registry/src/main/mdo/archetype-registry.mdo
    maven/archetype/trunk/archetype-models/pom.xml
Removed:
    maven/archetype/trunk/archetype-common/src/main/mdo/archetype-catalog.mdo
    maven/archetype/trunk/archetype-common/src/main/mdo/archetype-descriptor.mdo
    maven/archetype/trunk/archetype-common/src/main/mdo/archetype-registry.mdo
Modified:
    maven/archetype/trunk/archetype-common/pom.xml
    maven/archetype/trunk/maven-archetype-plugin/pom.xml
    maven/archetype/trunk/pom.xml

Modified: maven/archetype/trunk/archetype-common/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/pom.xml?rev=1036834&r1=1036833&r2=1036834&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/pom.xml (original)
+++ maven/archetype/trunk/archetype-common/pom.xml Fri Nov 19 13:37:58 2010
@@ -41,6 +41,18 @@ under the License.
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-catalog</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-descriptor</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-registry</artifactId>
+    </dependency>
+    <dependency>
       <groupId>net.sourceforge.jchardet</groupId>
       <artifactId>jchardet</artifactId>
     </dependency>
@@ -164,9 +176,6 @@ under the License.
           <version>1.0.0</version>
           <useJava5>true</useJava5>
           <models>
-            <model>src/main/mdo/archetype-registry.mdo</model>
-            <model>src/main/mdo/archetype-descriptor.mdo</model>
-            <model>src/main/mdo/archetype-catalog.mdo</model>
             <model>src/main/mdo/archetype.mdo</model>
           </models>
         </configuration>

Propchange: maven/archetype/trunk/archetype-models/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 19 13:37:58 2010
@@ -0,0 +1,8 @@
+nbproject
+target
+.classpath
+.project
+.settings
+*.iml
+*.ipr
+*.iws

Propchange: maven/archetype/trunk/archetype-models/archetype-catalog/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 19 13:37:58 2010
@@ -0,0 +1,8 @@
+nbproject
+target
+.classpath
+.project
+.settings
+*.iml
+*.ipr
+*.iws

Added: maven/archetype/trunk/archetype-models/archetype-catalog/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/archetype-catalog/pom.xml?rev=1036834&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-models/archetype-catalog/pom.xml (added)
+++ maven/archetype/trunk/archetype-models/archetype-catalog/pom.xml Fri Nov 19 
13:37:58 2010
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.archetype</groupId>
+    <artifactId>archetype-models</artifactId>
+    <version>2.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>archetype-catalog</artifactId>
+  <packaging>jar</packaging>
+
+  <name>Maven Archetype Catalog Model</name>
+  <description>Core Archetype Catalog Model.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <configuration>
+          <version>1.0.0</version>
+          <useJava5>true</useJava5>
+          <models>
+            <model>src/main/mdo/archetype-catalog.mdo</model>
+          </models>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: 
maven/archetype/trunk/archetype-models/archetype-catalog/src/main/mdo/archetype-catalog.mdo
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/archetype-catalog/src/main/mdo/archetype-catalog.mdo?rev=1036834&view=auto
==============================================================================
--- 
maven/archetype/trunk/archetype-models/archetype-catalog/src/main/mdo/archetype-catalog.mdo
 (added)
+++ 
maven/archetype/trunk/archetype-models/archetype-catalog/src/main/mdo/archetype-catalog.mdo
 Fri Nov 19 13:37:58 2010
@@ -0,0 +1,158 @@
+<?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.4.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.4.0 
http://modello.codehaus.org/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>http://repo1.maven.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 repository where to find the archetype.
+           When omitted, the archetype is searched for in the repository where 
the catalog comes from.</description>
+        </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>

Propchange: maven/archetype/trunk/archetype-models/archetype-descriptor/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 19 13:37:58 2010
@@ -0,0 +1,8 @@
+nbproject
+target
+.classpath
+.project
+.settings
+*.iml
+*.ipr
+*.iws

Added: maven/archetype/trunk/archetype-models/archetype-descriptor/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/archetype-descriptor/pom.xml?rev=1036834&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-models/archetype-descriptor/pom.xml (added)
+++ maven/archetype/trunk/archetype-models/archetype-descriptor/pom.xml Fri Nov 
19 13:37:58 2010
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.archetype</groupId>
+    <artifactId>archetype-models</artifactId>
+    <version>2.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>archetype-descriptor</artifactId>
+  <packaging>jar</packaging>
+
+  <name>Maven Archetype Descriptor Model</name>
+  <description>Core Archetype Descriptor Model.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <configuration>
+          <version>1.0.0</version>
+          <useJava5>true</useJava5>
+          <models>
+            <model>src/main/mdo/archetype-descriptor.mdo</model>
+          </models>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: 
maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/mdo/archetype-descriptor.mdo
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/mdo/archetype-descriptor.mdo?rev=1036834&view=auto
==============================================================================
--- 
maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/mdo/archetype-descriptor.mdo
 (added)
+++ 
maven/archetype/trunk/archetype-models/archetype-descriptor/src/main/mdo/archetype-descriptor.mdo
 Fri Nov 19 13:37:58 2010
@@ -0,0 +1,209 @@
+<?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>
+          <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>A fileset defines the way the project's files located in 
the jar file are used by the Archetype Plugin to generate a 
project.</description>
+      <fields>
+        <field xml.attribute="true">
+          <name>filtered</name>
+          <type>boolean</type>
+          <required>false</required>
+          <description>Filesets can be filtered, which means the selected 
files will be used as Velocity templates.
+          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>

Propchange: maven/archetype/trunk/archetype-models/archetype-registry/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 19 13:37:58 2010
@@ -0,0 +1,8 @@
+nbproject
+target
+.classpath
+.project
+.settings
+*.iml
+*.ipr
+*.iws

Added: maven/archetype/trunk/archetype-models/archetype-registry/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/archetype-registry/pom.xml?rev=1036834&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-models/archetype-registry/pom.xml (added)
+++ maven/archetype/trunk/archetype-models/archetype-registry/pom.xml Fri Nov 
19 13:37:58 2010
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.archetype</groupId>
+    <artifactId>archetype-models</artifactId>
+    <version>2.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>archetype-registry</artifactId>
+  <packaging>jar</packaging>
+
+  <name>Maven Archetype Registry Model</name>
+  <description>Core Archetype Registry Model.</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <configuration>
+          <version>1.0.0</version>
+          <useJava5>true</useJava5>
+          <models>
+            <model>src/main/mdo/archetype-registry.mdo</model>
+          </models>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: 
maven/archetype/trunk/archetype-models/archetype-registry/src/main/mdo/archetype-registry.mdo
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/archetype-registry/src/main/mdo/archetype-registry.mdo?rev=1036834&view=auto
==============================================================================
--- 
maven/archetype/trunk/archetype-models/archetype-registry/src/main/mdo/archetype-registry.mdo
 (added)
+++ 
maven/archetype/trunk/archetype-models/archetype-registry/src/main/mdo/archetype-registry.mdo
 Fri Nov 19 13:37:58 2010
@@ -0,0 +1,60 @@
+<?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-registry/${version}";
+  
xml.schemaLocation="http://maven.apache.org/xsd/archetype-registry-${version}.xsd";>
+  <id>archetype-registry</id>
+  <name>ArchetypeRegistry</name>
+  <description>
+    <![CDATA[
+    <p>This is a reference for the Archetype Registry descriptor.</p>
+    <p>The registry is stored in <code>~/.m2/archetype.xml</code> file.</p>]]>
+  </description>
+
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.maven.archetype.registry</value>
+    </default>
+  </defaults>
+
+  <classes>
+    <class rootElement="true" xml.tagName="archetype-registry">
+      <name>ArchetypeRegistry</name>
+      <fields>
+        <field>
+          <name>Languages</name>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>FilteredExtensions</name>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</model>

Added: maven/archetype/trunk/archetype-models/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-models/pom.xml?rev=1036834&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-models/pom.xml (added)
+++ maven/archetype/trunk/archetype-models/pom.xml Fri Nov 19 13:37:58 2010
@@ -0,0 +1,84 @@
+<?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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.archetype</groupId>
+    <artifactId>maven-archetype</artifactId>
+    <version>2.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>archetype-models</artifactId>
+  <packaging>pom</packaging>
+
+  <name>Maven Archetype Models</name>
+  <description>Core Archetype Models.</description>
+
+  <modules>
+    <module>archetype-catalog</module>
+    <module>archetype-descriptor</module>
+    <module>archetype-registry</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.modello</groupId>
+          <artifactId>modello-maven-plugin</artifactId>
+          <version>1.4</version>
+          <configuration>
+            <version>1.0.0</version>
+            <useJava5>true</useJava5>
+            <models>
+              <model>src/main/mdo/archetype-registry.mdo</model>
+              <model>src/main/mdo/archetype-descriptor.mdo</model>
+              <model>src/main/mdo/archetype-catalog.mdo</model>
+              <model>src/main/mdo/archetype.mdo</model>
+            </models>
+          </configuration>
+          <executions>
+            <execution>
+              <id>default</id>
+              <goals>
+                <goal>java</goal>
+                <goal>xpp3-reader</goal>
+                <goal>xpp3-writer</goal>
+                <goal>xsd</goal>
+              </goals>
+            </execution>
+            <execution>
+              <id>site-docs</id>
+              <phase>pre-site</phase>
+              <goals>
+                <goal>xdoc</goal>
+              </goals>
+            </execution>
+            <execution>
+              <id>site-xsd</id>
+              <phase>pre-site</phase>
+              <goals>
+                <goal>xsd</goal>
+              </goals>
+              <configuration>
+                
<outputDirectory>${basedir}/target/generated-site/resources/xsd</outputDirectory>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>

Modified: maven/archetype/trunk/maven-archetype-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/pom.xml?rev=1036834&r1=1036833&r2=1036834&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/pom.xml (original)
+++ maven/archetype/trunk/maven-archetype-plugin/pom.xml Fri Nov 19 13:37:58 
2010
@@ -47,6 +47,18 @@ under the License.
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-catalog</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-descriptor</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-registry</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
       <artifactId>archetype-common</artifactId>
     </dependency>
     <dependency>

Modified: maven/archetype/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/pom.xml?rev=1036834&r1=1036833&r2=1036834&view=diff
==============================================================================
--- maven/archetype/trunk/pom.xml (original)
+++ maven/archetype/trunk/pom.xml Fri Nov 19 13:37:58 2010
@@ -45,6 +45,7 @@ under the License.
 
   <modules>
     <module>archetype-testing</module>
+    <module>archetype-models</module>
     <module>archetype-common</module>
     <module>maven-archetype-plugin</module>
     <module>archetype-packaging</module>
@@ -76,6 +77,21 @@ under the License.
     <dependencies>
       <dependency>
         <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-catalog</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-descriptor</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-registry</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.archetype</groupId>
         <artifactId>archetype-common</artifactId>
         <version>${project.version}</version>
       </dependency>


Reply via email to