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/07/06 18:35:16 UTC

svn commit: r553946 [6/19] - in /maven/archetype/branches/maven-archetypeng: ./ maven-archetypeng-bundles/ maven-archetypeng-bundles/maven-archetypeng-archetype/ maven-archetypeng-bundles/maven-archetypeng-archetype/src/ maven-archetypeng-bundles/maven...

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-bundles/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-bundles/pom.xml?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-bundles/pom.xml (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-bundles/pom.xml Fri Jul  6 09:34:35 2007
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.codehaus.mojo.archetypeng</groupId>
+        <artifactId>maven-archetypeng</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>maven-archetypeng-bundles</artifactId>
+
+    <name>Maven ArchetypeNG Bundles</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>maven-archetypeng-start</module>
+        <module>maven-archetypeng-archetype</module>
+        <module>maven-archetypeng-plugin</module>
+        <module>maven-archetypeng-site</module>
+    </modules>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <reportSets>
+                    <reportSet></reportSet>
+                </reportSets>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>
\ No newline at end of file

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-bundles/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-bundles/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/pom.xml?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/pom.xml (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/pom.xml Fri Jul  6 09:34:35 2007
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.codehaus.mojo.archetypeng</groupId>
+        <artifactId>maven-archetypeng-core</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>maven-archetypeng-archetype-descriptor</artifactId>
+
+    <name>Maven ArchetypeNG Archetype Descriptor</name>
+    <packaging>jar</packaging>
+
+    <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>
+                <version>1.0-alpha-14</version>
+
+                <executions>
+                    <execution>
+                        <id>archetype-descriptor</id>
+                        <goals>
+                            <goal>xpp3-writer</goal>
+                            <goal>java</goal>
+                            <goal>xpp3-reader</goal>
+                            <goal>xsd</goal>
+                        </goals>
+                        <configuration>
+                            <version>1.0.0</version>
+                            <model>src/main/mdo/archetype-descriptor.mdo</model>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/src/main/mdo/archetype-descriptor.mdo
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/src/main/mdo/archetype-descriptor.mdo?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/src/main/mdo/archetype-descriptor.mdo (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-descriptor/src/main/mdo/archetype-descriptor.mdo Fri Jul  6 09:34:35 2007
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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.codehaus.mojo.archetypeng.archetype.filesets</value>
+        </default>
+    </defaults>
+
+    <!--
+        <archetype id="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 id="module-artifact-id">
+                   <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>id</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>
+            </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/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/pom.xml?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/pom.xml (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/pom.xml Fri Jul  6 09:34:35 2007
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.codehaus.mojo.archetypeng</groupId>
+        <artifactId>maven-archetypeng-core</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>maven-archetypeng-archetype-registry</artifactId>
+
+    <name>Maven ArchetypeNG Archetype Registry</name>
+    <packaging>jar</packaging>
+
+    <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>
+                <version>1.0-alpha-14</version>
+
+                <executions>
+                    <execution>
+                        <id>archetype-registry</id>
+                        <goals>
+                            <goal>xpp3-writer</goal>
+                            <goal>java</goal>
+                            <goal>xpp3-reader</goal>
+                            <goal>xsd</goal>
+                        </goals>
+                        <configuration>
+                            <version>1.0.0</version>
+                            <model>src/main/mdo/archetype-registry.mdo</model>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/src/main/mdo/archetype-registry.mdo
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/src/main/mdo/archetype-registry.mdo?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/src/main/mdo/archetype-registry.mdo (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-archetype-registry/src/main/mdo/archetype-registry.mdo Fri Jul  6 09:34:35 2007
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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.codehaus.mojo.archetypeng.registry</value>
+        </default>
+    </defaults>
+
+    <classes>
+        <class rootElement="true" xml.tagName="archetype-registry" >
+            <name>ArchetypeRegistry</name>
+            <fields>
+                <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>
+    </classes>
+</model>

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/pom.xml?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/pom.xml (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/pom.xml Fri Jul  6 09:34:35 2007
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.codehaus.mojo.archetypeng</groupId>
+        <artifactId>maven-archetypeng-core</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>maven-archetypeng-common</artifactId>
+
+    <name>Maven ArchetypeNG Common</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+         <dependency>
+             <groupId>net.sourceforge.jchardet</groupId>
+             <artifactId>jchardet</artifactId>
+         </dependency>
+        <dependency>
+            <groupId>org.codehaus.mojo.archetypeng</groupId>
+            <artifactId>maven-archetypeng-archetype-descriptor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.mojo.archetypeng</groupId>
+            <artifactId>maven-archetypeng-archetype-registry</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.shared</groupId>
+            <artifactId>maven-downloader</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.archetype</groupId>
+            <artifactId>maven-archetype-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jdom</groupId>
+            <artifactId>jdom</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact-manager</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-model</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-project</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-repository-metadata</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-container-default</artifactId>
+        </dependency>
+        <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>
+                <version>1.0-alpha-14</version>
+
+                <executions>
+                    <execution>
+                        <id>archetype-common</id>
+                        <goals>
+                            <goal>java</goal>
+                            <goal>xsd</goal>
+                        </goals>
+                        <configuration>
+                            <version>1.0.0</version>
+                            <model>src/main/mdo/archetype-common.mdo</model>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeArtifactManager.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeArtifactManager.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeArtifactManager.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeArtifactManager.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,180 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.shared.downloader.DownloadException;
+import org.apache.maven.shared.downloader.DownloadNotFoundException;
+
+import org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor;
+import org.codehaus.mojo.archetypeng.exception.UnknownArchetype;
+import org.codehaus.mojo.archetypeng.exception.UnknownGroup;
+
+import java.io.File;
+
+import java.util.List;
+import java.util.zip.ZipFile;
+
+public interface ArchetypeArtifactManager
+{
+    String ROLE = ArchetypeArtifactManager.class.getName ();
+
+    /**
+     */
+    File getArchetypeFile (
+        final String groupId,
+        final String artifactId,
+        final String version,
+        final ArtifactRepository localRepository,
+        final List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    ClassLoader getArchetypeJarLoader ( File archetypeFile )
+    throws UnknownArchetype;
+
+    /**
+     */
+    ClassLoader getArchetypeJarLoader (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    List getArchetypes ( String groupId, ArtifactRepository localRepository, List repositories )
+    throws UnknownGroup;
+
+    /**
+     */
+    ZipFile getArchetypeZipFile ( File archetypeFile )
+    throws UnknownArchetype;
+
+    /**
+     */
+    ZipFile getArchetypeZipFile (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    boolean exists (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    );
+
+    /**
+     */
+    boolean isFileSetArchetype (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    );
+
+    /**
+     */
+    ArchetypeDescriptor getFileSetArchetypeDescriptor ( File archetypeFile )
+    throws UnknownArchetype;
+
+    /**
+     */
+    org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor
+    getFileSetArchetypeDescriptor (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    List getFilesetArchetypeResources ( File archetypeFile )
+    throws UnknownArchetype;
+
+    /**
+     */
+    List getFilesetArchetypeResources (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    boolean isOldArchetype (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    );
+
+    /**
+     */
+    org.apache.maven.archetype.descriptor.ArchetypeDescriptor getOldArchetypeDescriptor (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    String getReleaseVersion (
+        String groupId,
+        String artifactId,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+
+    /**
+     */
+    List getVersions (
+        String groupId,
+        String artifactId,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype;
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeArtifactManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeArtifactManager.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFactory.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFactory.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFactory.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFactory.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import org.apache.maven.project.MavenProject;
+
+import java.util.Properties;
+
+public interface ArchetypeFactory
+{
+    String ROLE = ArchetypeFactory.class.getName ();
+
+    /**
+     */
+    ArchetypeConfiguration createArchetypeConfiguration (
+        ArchetypeDefinition archetypeDefinition,
+        Properties properties
+    );
+
+    /**
+     */
+    ArchetypeConfiguration createArchetypeConfiguration (
+        org.apache.maven.archetype.descriptor.ArchetypeDescriptor archetypeDescriptor,
+        Properties properties
+    );
+
+    /**
+     */
+    ArchetypeConfiguration createArchetypeConfiguration (
+        org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor archetypeDescriptor,
+        Properties properties
+    );
+
+    /**
+     */
+    ArchetypeConfiguration createArchetypeConfiguration (
+        MavenProject project,
+        ArchetypeDefinition archetypeDefinition,
+        Properties properties
+    );
+
+    /**
+     */
+    ArchetypeDefinition createArchetypeDefinition ( Properties properties );
+    void updateArchetypeConfiguration (
+        ArchetypeConfiguration archetypeConfiguration,
+        ArchetypeDefinition archetypeDefinition
+    );
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFactory.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFilesResolver.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFilesResolver.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFilesResolver.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFilesResolver.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import org.codehaus.mojo.archetypeng.archetype.filesets.FileSet;
+
+import java.io.File;
+import java.io.IOException;
+
+import java.util.List;
+
+/**
+ * @author  rafale
+ */
+public interface ArchetypeFilesResolver
+{
+    String ROLE = ArchetypeFilesResolver.class.getName ();
+
+    /**
+     */
+    List getFilesWithExtension ( List files, String extension );
+
+    /**
+     */
+    List getFilteredFiles ( List files, String filtered );
+
+    /**
+     */
+    List filterFiles ( FileSet fileSet, List archetypeResources );
+
+    /**
+     */
+    List filterFiles ( String moduleOffset, FileSet fileSet, List archetypeResources );
+
+    /**
+     */
+    List findOtherResources ( int level, List files, String languages );
+
+    /**
+     */
+    List findOtherResources ( int level, List files, List sourcesFiles, String languages );
+
+    /**
+     */
+    List findOtherSources ( int level, List files, String languages );
+
+    /**
+     */
+    List findResourcesMainFiles ( List files, String languages );
+
+    /**
+     */
+    List findResourcesTestFiles ( List files, String languages );
+
+    /**
+     */
+    List findSiteFiles ( List files, String languages );
+
+    /**
+     */
+    List findSourcesMainFiles ( List files, String languages );
+
+    /**
+     */
+    List findSourcesTestFiles ( List files, String languages );
+
+    /**
+     */
+    List getPackagedFiles ( List files, String packageName );
+
+    /**
+     */
+    String resolvePackage ( File file, List languages )
+    throws IOException;
+
+    /**
+     */
+    List getUnfilteredFiles ( List files, String filtered );
+
+    /**
+     */
+    List getUnpackagedFiles ( List files, String packageName );
+
+    /**
+     */
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFilesResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeFilesResolver.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypePropertiesManager.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypePropertiesManager.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypePropertiesManager.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypePropertiesManager.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import java.util.Properties;
+
+public interface ArchetypePropertiesManager
+{
+    String ROLE = ArchetypePropertiesManager.class.getName ();
+
+    /**
+     */
+    void readProperties ( Properties properties, File propertyFile )
+    throws FileNotFoundException, IOException;
+
+    /**
+     */
+    void writeProperties ( Properties properties, File propertyFile )
+    throws IOException;
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypePropertiesManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypePropertiesManager.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeRegistryManager.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeRegistryManager.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeRegistryManager.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeRegistryManager.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import org.codehaus.mojo.archetypeng.registry.ArchetypeRegistry;
+
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import java.util.List;
+
+public interface ArchetypeRegistryManager
+{
+    String ROLE = ArchetypeRegistryManager.class.getName ();
+
+    /**
+     */
+    List getArchetypeGroups ( File archetypeRegistryFile );
+
+    /**
+     */
+    ArchetypeRegistry readArchetypeRegistry ( File archetypeRegistryFile )
+    throws IOException, FileNotFoundException, XmlPullParserException;
+
+    /**
+     */
+    List getRepositories (
+        List pomRemoteRepositories,
+        String remoteRepositories,
+        File archetypeRegistryFile
+    )
+    throws IOException, XmlPullParserException;
+
+    /**
+     */
+    void writeArchetypeRegistry ( File archetypeRegistryFile, ArchetypeRegistry archetypeRegistry )
+    throws IOException;
+    
+    /**
+     */
+    List getLanguages ( String archetypeLanguages, File archetypeRegistryFile )
+    throws IOException;
+    
+    /**
+     */
+    List getFilteredExtensions ( String archetypeFilteredExtentions, File archetypeRegistryFile )
+    throws IOException;
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeRegistryManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/ArchetypeRegistryManager.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/Constants.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/Constants.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/Constants.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/Constants.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import java.util.Arrays;
+import java.util.List;
+
+public interface Constants
+{
+    String ARCHETYPE_ARTIFACT_ID = "archetype.artifactId";
+
+    String ARCHETYPE_DESCRIPTOR = "META-INF/maven/archetype-metadata.xml";
+
+    String OLD_ARCHETYPE_DESCRIPTOR = "META-INF/maven/archetype.xml";
+
+    String ARCHETYPE_GROUP_ID = "archetype.groupId";
+
+    String ARCHETYPE_POM = "pom.xml";
+
+    String ARCHETYPE_RESOURCES = "archetype-resources";
+
+    String ARCHETYPE_SUFFIX = "-archetype";
+
+    String ARCHETYPE_VERSION = "archetype.version";
+
+    String ARTIFACT_ID = "artifactId";
+
+    List DEFAULT_FILTERED_EXTENSIONS =
+        Arrays.asList (
+            new String[]
+            {
+                "java", "xml", "txt", "groovy", "cs", "mdo", "aj", "jsp", "gsp", "vm", "html",
+                "xhtml", "properties", ".classpath", ".project"
+            }
+        );
+
+    List DEFAULT_LANGUAGES =
+        Arrays.asList ( new String[] { "java", "groovy", "csharp", "aspectj" } );
+
+    String GROUP_ID = "groupId";
+
+    String MAIN = "main";
+
+    String OLDER_ARCHETYPE_DESCRIPTOR = "META-INF/archetype.xml";
+
+    String PACKAGE = "package";
+
+    String PACKAGE_NAME = "packageName";
+
+    String PARENT_ARTIFACT_ID = "parentArtifactId";
+
+    String POM_PATH = Constants.ARCHETYPE_RESOURCES + "/" + Constants.ARCHETYPE_POM;
+
+    String RESOURCES = "resources";
+
+    String SITE = "site";
+
+    String SRC = "src";
+
+    String TEST = "test";
+
+    String TMP = ".tmp";
+
+    String VERSION = "version";
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/Constants.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeArtifactManager.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeArtifactManager.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeArtifactManager.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeArtifactManager.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,655 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import org.apache.maven.archetype.descriptor.ArchetypeDescriptorBuilder;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata;
+import org.apache.maven.artifact.repository.metadata.Plugin;
+import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
+import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
+import org.apache.maven.artifact.repository.metadata.RepositoryMetadataResolutionException;
+import org.apache.maven.shared.downloader.DownloadException;
+import org.apache.maven.shared.downloader.DownloadNotFoundException;
+import org.apache.maven.shared.downloader.Downloader;
+
+import org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor;
+import org.codehaus.mojo.archetypeng.archetype.filesets.io.xpp3.ArchetypeDescriptorXpp3Reader;
+import org.codehaus.mojo.archetypeng.exception.UnknownArchetype;
+import org.codehaus.mojo.archetypeng.exception.UnknownGroup;
+
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
+
+/**
+ * @plexus.component
+ */
+public class DefaultArchetypeArtifactManager
+extends AbstractLogEnabled
+implements ArchetypeArtifactManager
+{
+    /**
+     * @plexus.requirement
+     */
+    private Downloader downloader;
+
+    /**
+     * @plexus.requirement
+     */
+    private RepositoryMetadataManager repositoryMetadataManager;
+
+    public File getArchetypeFile (
+        final String groupId,
+        final String artifactId,
+        final String version,
+        final ArtifactRepository localRepository,
+        final List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            return
+                downloader.download ( groupId, artifactId, version, localRepository, repositories );
+        }
+        catch ( DownloadNotFoundException ex )
+        {
+            throw new UnknownArchetype ( ex );
+        }
+        catch ( DownloadException ex )
+        {
+            throw new UnknownArchetype ( ex );
+        }
+    }
+
+    public ClassLoader getArchetypeJarLoader ( File archetypeFile )
+    throws UnknownArchetype
+    {
+        try
+        {
+            URL[] urls = new URL[1];
+
+            urls[0] = archetypeFile.toURI ().toURL ();
+
+            return new URLClassLoader ( urls );
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public ClassLoader getArchetypeJarLoader (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            File archetypeFile =
+                getArchetypeFile ( groupId, artifactId, version, localRepository, repositories );
+            URL[] urls = new URL[1];
+
+            urls[0] = archetypeFile.toURI ().toURL ();
+
+            return new URLClassLoader ( urls );
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public List getArchetypes (
+        String groupId,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownGroup
+    {
+        try
+        {
+            List archetypes = new ArrayList ();
+
+            RepositoryMetadata metadata = new GroupRepositoryMetadata ( groupId );
+
+            repositoryMetadataManager.resolve ( metadata, repositories, localRepository );
+
+            for (
+                Iterator iter = metadata.getMetadata ().getPlugins ().iterator ();
+                iter.hasNext ();
+            )
+            {
+                Plugin plugin = (Plugin) iter.next ();
+
+                Archetype archetype = new Archetype ();
+
+                archetype.setGroupId ( groupId );
+                archetype.setArtifactId ( plugin.getArtifactId () );
+                archetype.setName ( plugin.getName () );
+                archetype.setPrefix ( plugin.getPrefix () );
+
+                if ( getLogger ().isDebugEnabled () )
+                {
+                    getLogger ().debug ( "plugin=" + groupId + ":" + plugin.getArtifactId () );
+                }
+
+                if ( !archetypes.contains ( archetype ) )
+                {
+                    archetypes.add ( archetype );
+                }
+            } // end for
+
+            return archetypes;
+        }
+        catch ( RepositoryMetadataResolutionException e )
+        {
+            throw new UnknownGroup ( e );
+        }
+    }
+
+    public ZipFile getArchetypeZipFile ( File archetypeFile )
+    throws UnknownArchetype
+    {
+        try
+        {
+            return new ZipFile ( archetypeFile );
+        }
+        catch ( ZipException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+        catch ( IOException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public ZipFile getArchetypeZipFile (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            File archetypeFile =
+                getArchetypeFile ( groupId, artifactId, version, localRepository, repositories );
+
+            return new ZipFile ( archetypeFile );
+        }
+        catch ( ZipException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+        catch ( IOException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public boolean exists (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    {
+        try
+        {
+            File archetypeFile =
+                downloader.download ( groupId, artifactId, version, localRepository, repositories );
+
+            return archetypeFile.exists ();
+        }
+        catch ( DownloadException e )
+        {
+            return false;
+        }
+        catch ( DownloadNotFoundException e )
+        {
+            return false;
+        }
+    }
+
+    public boolean isFileSetArchetype (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    {
+        try
+        {
+            ClassLoader archetypeJarLoader =
+                getArchetypeJarLoader (
+                    groupId,
+                    artifactId,
+                    version,
+                    localRepository,
+                    repositories
+                );
+
+            org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor descriptor =
+                loadFileSetArchetypeDescriptor ( archetypeJarLoader );
+
+            return descriptor.getId () != null;
+        }
+        catch ( XmlPullParserException e )
+        {
+            return false;
+        }
+        catch ( IOException e )
+        {
+            return false;
+        }
+        catch ( UnknownArchetype e )
+        {
+            return false;
+        }
+    }
+
+    public ArchetypeDescriptor getFileSetArchetypeDescriptor ( File archetypeFile )
+    throws UnknownArchetype
+    {
+        try
+        {
+            ClassLoader archetypeJarLoader = getArchetypeJarLoader ( archetypeFile );
+
+            return loadFileSetArchetypeDescriptor ( archetypeJarLoader );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+        catch ( IOException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor
+    getFileSetArchetypeDescriptor (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            ClassLoader archetypeJarLoader =
+                getArchetypeJarLoader (
+                    groupId,
+                    artifactId,
+                    version,
+                    localRepository,
+                    repositories
+                );
+
+            return loadFileSetArchetypeDescriptor ( archetypeJarLoader );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+        catch ( IOException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public List getFilesetArchetypeResources ( File archetypeFile )
+    throws UnknownArchetype
+    {
+        List archetypeResources = new ArrayList ();
+
+        ZipFile zipFile = getArchetypeZipFile ( archetypeFile );
+
+        Enumeration enumeration = zipFile.entries ();
+        while ( enumeration.hasMoreElements () )
+        {
+            ZipEntry entry = (ZipEntry) enumeration.nextElement ();
+
+            if ( !entry.isDirectory ()
+                && entry.getName ().startsWith ( Constants.ARCHETYPE_RESOURCES )
+            )
+            {
+                String resource =
+                    StringUtils.replace (
+                        entry.getName (),
+                        Constants.ARCHETYPE_RESOURCES + "/",
+                        ""
+                    );
+                getLogger ().debug ( "Find resource " + entry.getName () );
+                archetypeResources.add ( resource );
+            }
+            else
+            {
+                getLogger ().debug ( "Not resource " + entry.getName () );
+            }
+        }
+        return archetypeResources;
+    }
+
+    public List getFilesetArchetypeResources (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        List archetypeResources = new ArrayList ();
+
+        ZipFile zipFile =
+            getArchetypeZipFile ( groupId, artifactId, version, localRepository, repositories );
+
+        Enumeration enumeration = zipFile.entries ();
+        while ( enumeration.hasMoreElements () )
+        {
+            ZipEntry entry = (ZipEntry) enumeration.nextElement ();
+
+            if ( !entry.isDirectory ()
+                && entry.getName ().startsWith ( Constants.ARCHETYPE_RESOURCES )
+            )
+            {
+                archetypeResources.add (
+                    StringUtils.replace (
+                        entry.getName (),
+                        Constants.ARCHETYPE_RESOURCES + "/",
+                        ""
+                    )
+                );
+            }
+        }
+        return archetypeResources;
+    }
+
+    public boolean isOldArchetype (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    {
+        try
+        {
+            ClassLoader archetypeJarLoader =
+                getArchetypeJarLoader (
+                    groupId,
+                    artifactId,
+                    version,
+                    localRepository,
+                    repositories
+                );
+
+            org.apache.maven.archetype.descriptor.ArchetypeDescriptor descriptor =
+                loadOldArchetypeDescriptor ( archetypeJarLoader );
+
+            return descriptor.getId () != null;
+        }
+        catch ( XmlPullParserException e )
+        {
+            return false;
+        }
+        catch ( IOException e )
+        {
+            return false;
+        }
+        catch ( UnknownArchetype ex )
+        {
+            return false;
+        }
+    }
+
+    public org.apache.maven.archetype.descriptor.ArchetypeDescriptor getOldArchetypeDescriptor (
+        String groupId,
+        String artifactId,
+        String version,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            ClassLoader archetypeJarLoader =
+                getArchetypeJarLoader (
+                    groupId,
+                    artifactId,
+                    version,
+                    localRepository,
+                    repositories
+                );
+
+            return loadOldArchetypeDescriptor ( archetypeJarLoader );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+        catch ( IOException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public String getReleaseVersion (
+        String groupId,
+        String artifactId,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            RepositoryMetadata metadata =
+                new GroupRepositoryMetadata ( groupId + "." + artifactId );
+
+            repositoryMetadataManager.resolve ( metadata, repositories, localRepository );
+
+            return metadata.getMetadata ().getVersioning ().getRelease ();
+        }
+        catch ( RepositoryMetadataResolutionException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    public List getVersions (
+        String groupId,
+        String artifactId,
+        ArtifactRepository localRepository,
+        List repositories
+    )
+    throws UnknownArchetype
+    {
+        try
+        {
+            RepositoryMetadata metadata =
+                new GroupRepositoryMetadata ( groupId + "." + artifactId );
+
+            repositoryMetadataManager.resolve ( metadata, repositories, localRepository );
+
+            return metadata.getMetadata ().getVersioning ().getVersions ();
+        }
+        catch ( RepositoryMetadataResolutionException e )
+        {
+            throw new UnknownArchetype ( e );
+        }
+    }
+
+    private Reader getArchetypeDescriptorReader ( ClassLoader archetypeJarLoader )
+    throws IOException
+    {
+        InputStream is = getStream ( Constants.ARCHETYPE_DESCRIPTOR, archetypeJarLoader );
+
+        if ( is == null )
+        {
+            throw new IOException (
+                "The " + Constants.ARCHETYPE_DESCRIPTOR + " descriptor cannot be found."
+            );
+        }
+
+        return new InputStreamReader ( is );
+    }
+
+    private org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor
+    loadFileSetArchetypeDescriptor ( ClassLoader archetypeJarLoader )
+    throws XmlPullParserException, IOException
+    {
+        Reader reader = getArchetypeDescriptorReader ( archetypeJarLoader );
+
+        ArchetypeDescriptorXpp3Reader archetypeReader = new ArchetypeDescriptorXpp3Reader ();
+
+        try
+        {
+            return archetypeReader.read ( reader, true );
+        }
+        finally
+        {
+            reader.close ();
+        }
+    }
+
+    private org.apache.maven.archetype.descriptor.ArchetypeDescriptor loadOldArchetypeDescriptor (
+        ClassLoader archetypeJarLoader
+    )
+    throws IOException, XmlPullParserException
+    {
+        ArchetypeDescriptorBuilder builder = new ArchetypeDescriptorBuilder ();
+
+        org.apache.maven.archetype.descriptor.ArchetypeDescriptor descriptor = null;
+
+        Reader reader = null;
+        try
+        {
+            reader = getOldArchetypeDescriptorReader ( archetypeJarLoader );
+
+            descriptor = builder.build ( reader );
+        }
+        catch ( IOException ex )
+        {
+            getLogger ().debug ( "Can not load old archetype", ex );
+        }
+        catch ( XmlPullParserException ex )
+        {
+            getLogger ().debug ( "Can not load old archetype", ex );
+        }
+        finally
+        {
+            if ( reader != null )
+            {
+                reader.close ();
+            }
+        }
+
+        if ( descriptor == null )
+        {
+            try
+            {
+                reader = getOlderArchetypeDescriptorReader ( archetypeJarLoader );
+
+                descriptor = builder.build ( reader );
+            }
+            finally
+            {
+                if ( reader != null )
+                {
+                    reader.close ();
+                }
+            }
+        }
+
+        return descriptor;
+    }
+
+    private Reader getOldArchetypeDescriptorReader ( ClassLoader archetypeJarLoader )
+    throws IOException
+    {
+        InputStream is = getStream ( Constants.OLD_ARCHETYPE_DESCRIPTOR, archetypeJarLoader );
+
+        if ( is == null )
+        {
+            throw new IOException (
+                "The " + Constants.OLD_ARCHETYPE_DESCRIPTOR + " descriptor cannot be found."
+            );
+        }
+
+        return new InputStreamReader ( is );
+    }
+
+    private Reader getOlderArchetypeDescriptorReader ( ClassLoader archetypeJarLoader )
+    throws IOException
+    {
+        InputStream is = getStream ( Constants.OLDER_ARCHETYPE_DESCRIPTOR, archetypeJarLoader );
+
+        if ( is == null )
+        {
+            throw new IOException (
+                "The " + Constants.OLDER_ARCHETYPE_DESCRIPTOR + " descriptor cannot be found."
+            );
+        }
+
+        return new InputStreamReader ( is );
+    }
+
+    private InputStream getStream ( String name, ClassLoader loader )
+    {
+        return
+            ( loader == null )
+            ? Thread.currentThread ().getContextClassLoader ().getResourceAsStream ( name )
+            : loader.getResourceAsStream ( name );
+    }
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeArtifactManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeArtifactManager.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeFactory.java
URL: http://svn.apache.org/viewvc/maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeFactory.java?view=auto&rev=553946
==============================================================================
--- maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeFactory.java (added)
+++ maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeFactory.java Fri Jul  6 09:34:35 2007
@@ -0,0 +1,354 @@
+/*
+ * 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.
+ */
+
+package org.codehaus.mojo.archetypeng;
+
+import org.apache.maven.project.MavenProject;
+
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * @plexus.component
+ */
+public class DefaultArchetypeFactory
+extends AbstractLogEnabled
+implements ArchetypeFactory
+{
+    public ArchetypeConfiguration createArchetypeConfiguration (
+        ArchetypeDefinition archetypeDefinition,
+        Properties properties
+    )
+    {
+        ArchetypeConfiguration configuration = new ArchetypeConfiguration ();        
+       getLogger ().debug ( "Creating ArchetypeConfiguration from ArchetypeDefinition and Properties" );
+
+        configuration.setGroupId ( archetypeDefinition.getGroupId () );
+        configuration.setArtifactId ( archetypeDefinition.getArtifactId () );
+        configuration.setVersion ( archetypeDefinition.getVersion () );
+
+        Iterator propertiesIterator = properties.keySet ().iterator ();
+        while ( propertiesIterator.hasNext () )
+        {
+            String property = (String) propertiesIterator.next ();
+            if ( !Constants.ARCHETYPE_GROUP_ID.equals ( property )
+                && !Constants.ARCHETYPE_ARTIFACT_ID.equals ( property )
+                && !Constants.ARCHETYPE_VERSION.equals ( property )
+            )
+            {
+                configuration.addRequiredProperty ( property );
+                
+                getLogger ().debug ( "Adding requiredProperty " + property );
+                
+                configuration.setProperty ( property, properties.getProperty ( property ) );
+                
+                getLogger ().debug ( "Adding property " + property + "=" + properties.getProperty ( property ) );
+            }
+        }
+
+        return configuration;
+    }
+
+    public ArchetypeConfiguration createArchetypeConfiguration (
+        org.apache.maven.archetype.descriptor.ArchetypeDescriptor archetypeDescriptor,
+        Properties properties
+    )
+    {
+        ArchetypeConfiguration configuration = new ArchetypeConfiguration ();        
+       getLogger ().debug ( "Creating ArchetypeConfiguration from legacy descriptor and Properties" );
+
+        configuration.setGroupId ( properties.getProperty ( Constants.ARCHETYPE_GROUP_ID, null ) );
+        configuration.setArtifactId (
+            properties.getProperty ( Constants.ARCHETYPE_ARTIFACT_ID, null )
+        );
+        configuration.setVersion ( properties.getProperty ( Constants.ARCHETYPE_VERSION, null ) );
+
+        configuration.setName ( archetypeDescriptor.getId () );
+
+        configuration.addRequiredProperty ( Constants.GROUP_ID );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.GROUP_ID );
+        if ( null != properties.getProperty ( Constants.GROUP_ID, null ) )
+        {
+            configuration.setProperty (
+                Constants.GROUP_ID,
+                properties.getProperty ( Constants.GROUP_ID )
+            );
+            getLogger ().debug ( "Setting property " + Constants.GROUP_ID + "=" +
+                configuration.getProperty ( Constants.GROUP_ID ));
+        }
+        configuration.addRequiredProperty ( Constants.ARTIFACT_ID );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.ARTIFACT_ID );
+        if ( null != properties.getProperty ( Constants.ARTIFACT_ID, null ) )
+        {
+            configuration.setProperty (
+                Constants.ARTIFACT_ID,
+                properties.getProperty ( Constants.ARTIFACT_ID )
+            );
+            getLogger ().debug ( "Setting property " + Constants.ARTIFACT_ID + "=" +
+                configuration.getProperty ( Constants.ARTIFACT_ID ));
+        }
+        configuration.addRequiredProperty ( Constants.VERSION );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.VERSION );
+        if ( null != properties.getProperty ( Constants.VERSION, null ) )
+        {
+            configuration.setProperty (
+                Constants.VERSION,
+                properties.getProperty ( Constants.VERSION )
+            );
+            getLogger ().debug ( "Setting property " + Constants.VERSION + "=" +
+                configuration.getProperty ( Constants.VERSION ));
+        }
+        configuration.addRequiredProperty ( Constants.PACKAGE );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.PACKAGE );
+        if ( null
+            != properties.getProperty (
+                Constants.PACKAGE,
+                properties.getProperty ( Constants.PACKAGE_NAME, null )
+            )
+        )
+        {
+            configuration.setProperty (
+                Constants.PACKAGE,
+                properties.getProperty (
+                    Constants.PACKAGE,
+                    properties.getProperty ( Constants.PACKAGE_NAME )
+                )
+            );
+            getLogger ().debug ( "Setting property " + Constants.PACKAGE_NAME + "=" +
+                configuration.getProperty ( Constants.PACKAGE_NAME ));
+        }
+
+        return configuration;
+    }
+
+    public ArchetypeConfiguration createArchetypeConfiguration (
+        org.codehaus.mojo.archetypeng.archetype.filesets.ArchetypeDescriptor archetypeDescriptor,
+        Properties properties
+    )
+    {              
+        ArchetypeConfiguration configuration = new ArchetypeConfiguration ();
+       getLogger ().debug ( "Creating ArchetypeConfiguration from fileset descriptor and Properties" );
+
+        configuration.setGroupId ( properties.getProperty ( Constants.ARCHETYPE_GROUP_ID, null ) );
+        configuration.setArtifactId (
+            properties.getProperty ( Constants.ARCHETYPE_ARTIFACT_ID, null )
+        );
+        configuration.setVersion ( properties.getProperty ( Constants.ARCHETYPE_VERSION, null ) );
+
+        configuration.setName ( archetypeDescriptor.getId () );
+
+        Iterator requiredProperties = archetypeDescriptor.getRequiredProperties ().iterator ();
+        while ( requiredProperties.hasNext () )
+        {
+            org.codehaus.mojo.archetypeng.archetype.filesets.RequiredProperty requiredProperty =
+                (org.codehaus.mojo.archetypeng.archetype.filesets.RequiredProperty)
+                requiredProperties.next ();
+
+            configuration.addRequiredProperty ( requiredProperty.getKey () );                
+            getLogger ().debug ( "Adding requiredProperty " + requiredProperty.getKey () );
+
+            if ( null
+                != properties.getProperty (
+                    requiredProperty.getKey (),
+                    requiredProperty.getDefaultValue ()
+                )
+            )
+            {
+                configuration.setProperty (
+                    requiredProperty.getKey (),
+                    properties.getProperty (
+                        requiredProperty.getKey (),
+                        requiredProperty.getDefaultValue ()
+                    )
+                );
+                getLogger ().debug ( "Setting property " + requiredProperty.getKey () + "=" +
+                    configuration.getProperty ( requiredProperty.getKey () ));
+            }
+            if ( null != requiredProperty.getDefaultValue () )
+            {
+                configuration.setDefaultProperty (
+                    requiredProperty.getKey (),
+                    requiredProperty.getDefaultValue ()
+                );
+                getLogger ().debug ( "Setting defaultProperty " + requiredProperty.getKey () + "=" +
+                    configuration.getDefaultValue ( requiredProperty.getKey () ));
+            }
+        } // end while
+
+        configuration.addRequiredProperty ( Constants.GROUP_ID );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.GROUP_ID );
+        if ( null != properties.getProperty ( Constants.GROUP_ID, null ) )
+        {
+            configuration.setProperty (
+                Constants.GROUP_ID,
+                properties.getProperty ( Constants.GROUP_ID )
+            );
+            getLogger ().debug ( "Setting property " + Constants.GROUP_ID + "=" +
+                configuration.getProperty ( Constants.GROUP_ID ));
+        }
+        configuration.addRequiredProperty ( Constants.ARTIFACT_ID );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.ARTIFACT_ID );
+        if ( null != properties.getProperty ( Constants.ARTIFACT_ID, null ) )
+        {
+            configuration.setProperty (
+                Constants.ARTIFACT_ID,
+                properties.getProperty ( Constants.ARTIFACT_ID )
+            );
+            getLogger ().debug ( "Setting property " + Constants.ARTIFACT_ID + "=" +
+                configuration.getProperty ( Constants.ARTIFACT_ID ));
+        }
+        configuration.addRequiredProperty ( Constants.VERSION );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.VERSION );
+        if ( null != properties.getProperty ( Constants.VERSION, null ) )
+        {
+            configuration.setProperty (
+                Constants.VERSION,
+                properties.getProperty ( Constants.VERSION )
+            );
+            getLogger ().debug ( "Setting property " + Constants.VERSION + "=" +
+                configuration.getProperty ( Constants.VERSION ));
+        }
+        configuration.addRequiredProperty ( Constants.PACKAGE );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.PACKAGE );
+        if ( null
+            != properties.getProperty (
+                Constants.PACKAGE,
+                properties.getProperty ( Constants.PACKAGE_NAME, null )
+            )
+        )
+        {
+            configuration.setProperty (
+                Constants.PACKAGE,
+                properties.getProperty (
+                    Constants.PACKAGE,
+                    properties.getProperty ( Constants.PACKAGE_NAME )
+                )
+            );
+            getLogger ().debug ( "Setting property " + Constants.PACKAGE + "=" +
+                configuration.getProperty ( Constants.PACKAGE ));
+        }
+
+        return configuration;
+    }
+
+    public ArchetypeConfiguration createArchetypeConfiguration (
+        MavenProject project,
+        ArchetypeDefinition archetypeDefinition,
+        Properties properties
+    )
+    {
+        ArchetypeConfiguration configuration = new ArchetypeConfiguration ();
+       getLogger ().debug ( "Creating ArchetypeConfiguration from ArchetypeDefinition, MavenProject and Properties" );
+
+        configuration.setGroupId ( archetypeDefinition.getGroupId () );
+        configuration.setArtifactId ( archetypeDefinition.getArtifactId () );
+        configuration.setVersion ( archetypeDefinition.getVersion () );
+
+        configuration.addRequiredProperty ( Constants.GROUP_ID );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.GROUP_ID );
+        configuration.setDefaultProperty ( Constants.GROUP_ID, project.getGroupId () );
+        if ( null != properties.getProperty ( Constants.GROUP_ID, null ) )
+        {
+            configuration.setProperty (
+                Constants.GROUP_ID,
+                properties.getProperty ( Constants.GROUP_ID )
+            );
+            getLogger ().debug ( "Setting property " + Constants.GROUP_ID + "=" +
+                configuration.getProperty ( Constants.GROUP_ID ));
+        }
+
+        configuration.addRequiredProperty ( Constants.ARTIFACT_ID );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.ARTIFACT_ID );
+        configuration.setDefaultProperty ( Constants.ARTIFACT_ID, project.getArtifactId () );
+        if ( null != properties.getProperty ( Constants.ARTIFACT_ID, null ) )
+        {
+            configuration.setProperty (
+                Constants.ARTIFACT_ID,
+                properties.getProperty ( Constants.ARTIFACT_ID )
+            );
+            getLogger ().debug ( "Setting property " + Constants.ARTIFACT_ID + "=" +
+                configuration.getProperty ( Constants.ARTIFACT_ID ));
+        }
+
+        configuration.addRequiredProperty ( Constants.VERSION );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.VERSION );
+        configuration.setDefaultProperty ( Constants.VERSION, project.getVersion () );
+        if ( null != properties.getProperty ( Constants.VERSION, null ) )
+        {
+            configuration.setProperty (
+                Constants.VERSION,
+                properties.getProperty ( Constants.VERSION )
+            );
+            getLogger ().debug ( "Setting property " + Constants.VERSION + "=" +
+                configuration.getProperty ( Constants.VERSION ));
+        }
+
+        configuration.addRequiredProperty ( Constants.PACKAGE );
+        getLogger ().debug ( "Adding requiredProperty " + Constants.PACKAGE );
+        if ( null
+            != properties.getProperty (
+                Constants.PACKAGE,
+                properties.getProperty ( Constants.PACKAGE_NAME, null )
+            )
+        )
+        {
+            configuration.setProperty (
+                Constants.PACKAGE,
+                properties.getProperty (
+                    Constants.PACKAGE,
+                    properties.getProperty ( Constants.PACKAGE_NAME )
+                )
+            );
+            getLogger ().debug ( "Setting property " + Constants.PACKAGE + "=" +
+                configuration.getProperty ( Constants.PACKAGE ));
+        }
+
+        return configuration;
+    }
+
+    public ArchetypeDefinition createArchetypeDefinition ( Properties properties )
+    {
+        ArchetypeDefinition definition = new ArchetypeDefinition ();              
+        getLogger ().debug ( "Creating ArchetypeDefinition (" +
+            properties.getProperty ( Constants.ARCHETYPE_GROUP_ID, null ) + ":" +
+            properties.getProperty ( Constants.ARCHETYPE_ARTIFACT_ID, null ) + ":" +
+            properties.getProperty ( Constants.ARCHETYPE_VERSION, null ) + ")" 
+        );
+
+        definition.setGroupId ( properties.getProperty ( Constants.ARCHETYPE_GROUP_ID, null ) );
+        definition.setArtifactId (
+            properties.getProperty ( Constants.ARCHETYPE_ARTIFACT_ID, null )
+        );
+        definition.setVersion ( properties.getProperty ( Constants.ARCHETYPE_VERSION, null ) );
+       
+        return definition;
+    }
+
+    public void updateArchetypeConfiguration (
+        ArchetypeConfiguration archetypeConfiguration,
+        ArchetypeDefinition archetypeDefinition
+    )
+    {
+        archetypeConfiguration.setGroupId ( archetypeDefinition.getGroupId () );
+        archetypeConfiguration.setArtifactId ( archetypeDefinition.getArtifactId () );
+        archetypeConfiguration.setVersion ( archetypeDefinition.getVersion () );
+    }
+}

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/branches/maven-archetypeng/maven-archetypeng-core/maven-archetypeng-common/src/main/java/org/codehaus/mojo/archetypeng/DefaultArchetypeFactory.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"