You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2007/09/20 10:21:31 UTC

svn commit: r577623 - in /maven/sandbox/trunk/archetypeng: archetype-common/src/main/mdo/archetype-descriptor.mdo archetype-common/src/main/mdo/archetype-registry.mdo archetype-creator/pom.xml archetype-generator/pom.xml

Author: jvanzyl
Date: Thu Sep 20 01:21:30 2007
New Revision: 577623

URL: http://svn.apache.org/viewvc?rev=577623&view=rev
Log:
o not sure about all the little mdo files, from looking i think two would probably do

Added:
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-descriptor.mdo
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-registry.mdo
Modified:
    maven/sandbox/trunk/archetypeng/archetype-creator/pom.xml
    maven/sandbox/trunk/archetypeng/archetype-generator/pom.xml

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-descriptor.mdo
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-descriptor.mdo?rev=577623&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-descriptor.mdo (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-descriptor.mdo Thu Sep 20 01:21:30 2007
@@ -0,0 +1,210 @@
+<?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>
+  <id>archetype-descriptor</id>
+  <name>ArchetypeDescriptor</name>
+
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.maven.archetype.metadata</value>
+    </default>
+  </defaults>
+
+  <!--
+      <archetype name="archetype-artifact-id" partial="true|false" >
+         <requiredProperties>
+             <requiredProperty key="propKey" >
+                 <defaultValue>string to replace</defaultValue>
+             </requiredProperty>
+         </requiredProperties>
+         <fileSets>
+             <fileSet filtered="true|false" packaged="true|false" >
+                 <directory>src/main/java</directory>
+                 <includes>
+                     <include>**/*.java</include>
+                 </includes>
+                 <excludes>
+                     <exclude>Main.java</exclude>
+                 </excludes>
+             </fileSet>
+         </fileSets>
+         <modules>
+             <module name="module-id" id="module-artifact-id" dir="module-dir">
+                 <fileSets/>
+                 <modules/>
+             </module>
+         </modules>
+      </archetype>
+  -->
+
+  <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>
+        </field>
+        <field xml.attribute="true">
+          <name>partial</name>
+          <type>boolean</type>
+          <required>false</required>
+        </field>
+        <field>
+          <name>requiredProperties</name>
+          <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>
+        </field>
+        <field xml.attribute="true">
+          <name>dir</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field xml.attribute="true">
+          <name>name</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+      </fields>
+    </class>
+
+    <class>
+      <name>AbstractArchetypeDescriptor</name>
+      <fields>
+        <field>
+          <name>fileSets</name>
+          <association>
+            <type>FileSet</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <required>true</required>
+        </field>
+        <field>
+          <name>modules</name>
+          <association>
+            <type>ModuleDescriptor</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <required>false</required>
+        </field>
+      </fields>
+    </class>
+
+    <class>
+      <name>FileSet</name>
+      <fields>
+        <field xml.attribute="true">
+          <name>filtered</name>
+          <type>boolean</type>
+          <required>false</required>
+        </field>
+        <field xml.attribute="true">
+          <name>packaged</name>
+          <type>boolean</type>
+          <required>false</required>
+        </field>
+        <field xml.attribute="true">
+          <name>encoding</name>
+          <type>String</type>
+          <required>false</required>
+        </field>
+        <field>
+          <name>directory</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>includes</name>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <required>false</required>
+        </field>
+        <field>
+          <name>excludes</name>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <required>false</required>
+        </field>
+      </fields>
+      <codeSegments>
+        <codeSegment>
+          <code><![CDATA[
+    {
+        filtered = true;
+        packaged = true;
+    }
+
+    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>
+      <fields>
+        <field xml.attribute="true">
+          <name>key</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>defaultValue</name>
+          <type>String</type>
+          <required>false</required>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</model>

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-registry.mdo
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-registry.mdo?rev=577623&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-registry.mdo (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/mdo/archetype-registry.mdo Thu Sep 20 01:21:30 2007
@@ -0,0 +1,147 @@
+<?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>
+  <id>archetype-registry</id>
+  <name>ArchetypeRegistry</name>
+
+  <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>archetypes</name>
+          <association>
+            <type>Archetype</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>ArchetypeGroups</name>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>ArchetypeRepositories</name>
+          <association>
+            <type>ArchetypeRepository</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <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>
+
+    <class>
+      <name>ArchetypeRepository</name>
+      <fields>
+        <field xml.attribute="true">
+          <name>id</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>url</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+      </fields>
+      <codeSegments>
+        <codeSegment>
+          <code><![CDATA[
+    public String toString ()
+    {
+        return getId () + " (" + getUrl () + ")";
+
+    }
+
+    public int hashCode ()
+    {
+        return getId ().hashCode ();
+    }
+
+    public boolean equals (Object other)
+    {
+        if ( other == null ||
+           !(other instanceof ArchetypeRepository ) )
+        {
+            return false;
+        }
+
+        return getId ().equals ( ((ArchetypeRepository) other).getId () );
+    }
+                    ]]></code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+
+    <class>
+      <name>Archetype</name>
+      <fields>
+        <field>
+          <name>groupId</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>artifactId</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>version</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>repository</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>description</name>
+          <type>String</type>
+          <required>true</required>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</model>

Modified: maven/sandbox/trunk/archetypeng/archetype-creator/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-creator/pom.xml?rev=577623&r1=577622&r2=577623&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-creator/pom.xml (original)
+++ maven/sandbox/trunk/archetypeng/archetype-creator/pom.xml Thu Sep 20 01:21:30 2007
@@ -39,10 +39,6 @@
       <artifactId>archetype-common</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.archetype</groupId>
-      <artifactId>archetype-descriptor</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
       <scope>test</scope>

Modified: maven/sandbox/trunk/archetypeng/archetype-generator/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-generator/pom.xml?rev=577623&r1=577622&r2=577623&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-generator/pom.xml (original)
+++ maven/sandbox/trunk/archetypeng/archetype-generator/pom.xml Thu Sep 20 01:21:30 2007
@@ -41,10 +41,6 @@
       <artifactId>archetype-common</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.archetype</groupId>
-      <artifactId>archetype-descriptor</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-velocity</artifactId>
     </dependency>