maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raf...@apache.org
Subject svn commit: r579343 [6/9] - in /maven/sandbox/trunk/archetypeng: ./ archetype-common/ archetype-common/src/main/java/org/apache/maven/archetype/ archetype-common/src/main/java/org/apache/maven/archetype/creator/ archetype-common/src/main/java/org/apach...
Date Tue, 25 Sep 2007 18:25:29 GMT
Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/META-INF/maven/archetype-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/META-INF/maven/archetype-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/META-INF/maven/archetype-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,37 @@
+<?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.
+-->
+<archetype-descriptor name="partial" partial="true">
+
+  <fileSets>
+    <fileSet filtered="true" packaged="true">
+      <directory>src/main/java</directory>
+      <includes>
+        <include>**/*.java</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" packaged="true">
+      <directory>src/test/java</directory>
+      <includes>
+        <include>**/*.java</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+
+</archetype-descriptor>

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/pom.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/pom.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/pom.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <version>${version}</version>
+
+  <name>Maven ArchetypeNG Test partial</name>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-info-reports-plugin</artifactId>
+        <version>2.0</version>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/main/java/App.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/main/java/App.java?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/main/java/App.java (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/main/java/App.java Tue Sep 25 11:25:05 2007
@@ -0,0 +1,4 @@
+groupId=${groupId}
+artifactId=${artifactId}
+version=${version}
+package=${package}
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/main/java/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/test/java/AppTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/test/java/AppTest.java?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/test/java/AppTest.java (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/test/java/AppTest.java Tue Sep 25 11:25:05 2007
@@ -0,0 +1,4 @@
+groupId=${groupId}
+artifactId=${artifactId}
+version=${version}
+package=${package}
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/partial-1.0/archetype-resources/src/test/java/AppTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/META-INF/maven/archetype-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/META-INF/maven/archetype-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/META-INF/maven/archetype-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,55 @@
+<?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.
+-->
+<archetype-descriptor name="site">
+
+  <requiredProperties>
+    <requiredProperty key="property-with-default-1">
+      <defaultValue>default-value</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="property-with-default-2">
+      <defaultValue>default-value</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="property-with-default-3">
+      <defaultValue>default-value</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="property-with-default-4">
+      <defaultValue>default-value</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="property-without-default-1">
+    </requiredProperty>
+    <requiredProperty key="property-without-default-2">
+    </requiredProperty>
+    <requiredProperty key="property-without-default-3">
+    </requiredProperty>
+    <requiredProperty key="property-without-default-4">
+    </requiredProperty>
+  </requiredProperties>
+
+  <fileSets>
+    <fileSet filtered="true" packaged="false">
+      <directory>src/site</directory>
+      <includes>
+        <include>**/*.xml</include>
+        <include>**/*.apt</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+
+</archetype-descriptor>

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/pom.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/pom.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/pom.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <version>${version}</version>
+
+  <name>Maven ArchetypeNG Test site</name>
+  <packaging>pom</packaging>
+</project>

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/apt/test.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/apt/test.apt?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/apt/test.apt (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/apt/test.apt Tue Sep 25 11:25:05 2007
@@ -0,0 +1,12 @@
+groupId=${groupId}
+artifactId=${artifactId}
+version=${version}
+package=${package}
+property-without-default-1=${property-without-default-1}
+property-without-default-2=${property-without-default-2}
+property-without-default-3=${property-without-default-3}
+property-without-default-4=${property-without-default-4}
+property-with-default-1=${property-with-default-1}
+property-with-default-2=${property-with-default-2}
+property-with-default-3=${property-with-default-3}
+property-with-default-4=${property-with-default-4}
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/apt/test.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/site.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/site.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/site.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,12 @@
+groupId=${groupId}
+  artifactId=${artifactId}
+  version=${version}
+  package=${package}
+  property-without-default-1=${property-without-default-1}
+  property-without-default-2=${property-without-default-2}
+  property-without-default-3=${property-without-default-3}
+  property-without-default-4=${property-without-default-4}
+  property-with-default-1=${property-with-default-1}
+  property-with-default-2=${property-with-default-2}
+  property-with-default-3=${property-with-default-3}
+  property-with-default-4=${property-with-default-4}
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/archetypes/site-1.0/archetype-resources/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/basic/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/basic/maven-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/basic/maven-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/basic/maven-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,31 @@
+<?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.
+-->
+<metadata>
+  <groupId>archetypes</groupId>
+  <artifactId>basic</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20060220044115</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/basic/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/fileset/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/fileset/maven-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/fileset/maven-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/fileset/maven-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,31 @@
+<?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.
+-->
+<metadata>
+  <groupId>archetypes</groupId>
+  <artifactId>fileset</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20060220044115</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/fileset/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/maven-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/maven-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/maven-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,38 @@
+<?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.
+-->
+<metadata>
+  <plugins>
+    <plugin>
+      <name>Maven TEST Complete Plugin</name>
+      <prefix>archetypes</prefix>
+      <artifactId>basic</artifactId>
+    </plugin>
+    <plugin>
+      <name>Maven TEST Partial Plugin</name>
+      <prefix>archetypes</prefix>
+      <artifactId>partial</artifactId>
+    </plugin>
+    <plugin>
+      <name>Maven TEST Site Plugin</name>
+      <prefix>archetypes</prefix>
+      <artifactId>site</artifactId>
+    </plugin>
+  </plugins>
+</metadata>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/old/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/old/maven-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/old/maven-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/old/maven-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,31 @@
+<?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.
+-->
+<metadata>
+  <groupId>archetypes</groupId>
+  <artifactId>old</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20060220044115</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/old/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/partial/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/partial/maven-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/partial/maven-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/partial/maven-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,31 @@
+<?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.
+-->
+<metadata>
+  <groupId>archetypes</groupId>
+  <artifactId>partial</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20060220044115</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/partial/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/site/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/site/maven-metadata.xml?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/site/maven-metadata.xml (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/site/maven-metadata.xml Tue Sep 25 11:25:05 2007
@@ -0,0 +1,31 @@
+<?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.
+-->
+<metadata>
+  <groupId>archetypes</groupId>
+  <artifactId>site</artifactId>
+  <versioning>
+    <latest>1.0</latest>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20060220044115</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/central-repository/site/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreationConfiguratorTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreationConfiguratorTest.java?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreationConfiguratorTest.java (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreationConfiguratorTest.java Tue Sep 25 11:25:05 2007
@@ -0,0 +1,624 @@
+/*
+ * 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.apache.maven.archetype.creator;
+
+import org.apache.maven.archetype.common.Constants;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuildingException;
+
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+public class DefaultArchetypeCreationConfiguratorTest
+    extends AbstractMojoTestCase
+{
+    private List languages;
+    private DefaultArtifactRepository localRepository;
+
+    private List repositories;
+// Commented out since no exception are thrown if using defaults to all values
+//    public void testBatchModeArchetypeNotConfigured ()
+//    throws Exception
+//    {
+//        System.out.println ( "testBatchModeArchetypeNotConfigured" );
+//
+//        String project = "configure-creation-3";
+//        File projectFile = getProjectFile ( project );
+//        File projectFileSample = getProjectSampleFile ( project );
+//        copy ( projectFileSample, projectFile );
+//        FileUtils.deleteDirectory ( new File ( projectFile.getParentFile (), "target" ) );
+//
+//        MavenProject mavenProject = loadProject ( projectFile );
+//
+//        DefaultArchetypeCreationConfigurator instance =
+//            (DefaultArchetypeCreationConfigurator) lookup ( ArchetypeCreationConfigurator.ROLE );
+//        instanceDefined ( instance );
+//
+//        Properties commandLineProperties = new Properties ();
+//
+//        File propertyFile = getPropertiesFile ( project );
+//        File propertyFileSample = getPropertiesSampleFile ( project );
+//        copy ( propertyFileSample, propertyFile );
+//
+//        try
+//        {
+//        languages = new ArrayList();
+//        languages.add("java");
+//        languages.add("aspectj");
+//        languages.add("csharp");
+//        languages.add("groovy");
+//            instance.configureArchetypeCreation (
+//                mavenProject,
+//                Boolean.FALSE,
+//                commandLineProperties,
+//                propertyFile,
+//                languages
+//            );
+//
+//            fail ( "Exception must be thrown" );
+//        }
+//        catch ( ArchetypeNotConfigured e )
+//        {
+//            assertEquals (
+//                "Exception not correct",
+//                "The archetype is not configured",
+//                e.getMessage ()
+//            );
+//        }
+//    }
+// Commented out since no exception are thrown if using defaults to all values
+//    public void testBatchModeArchetypeNotDefined ()
+//    throws Exception
+//    {
+//        System.out.println ( "testBatchModeArchetypeNotDefined" );
+//
+//        String project = "configure-creation-2";
+//        File projectFile = getProjectFile ( project );
+//        File projectFileSample = getProjectSampleFile ( project );
+//        copy ( projectFileSample, projectFile );
+//        FileUtils.deleteDirectory ( new File ( projectFile.getParentFile (), "target" ) );
+//
+//        MavenProject mavenProject = loadProject ( projectFile );
+//
+//        DefaultArchetypeCreationConfigurator instance =
+//            (DefaultArchetypeCreationConfigurator) lookup ( ArchetypeCreationConfigurator.ROLE );
+//        instanceDefined ( instance );
+//
+//        Properties commandLineProperties = new Properties ();
+//
+//        File propertyFile = getPropertiesFile ( project );
+//        File propertyFileSample = getPropertiesSampleFile ( project );
+//        copy ( propertyFileSample, propertyFile );
+//
+//        try
+//        {
+//        languages = new ArrayList();
+//        languages.add("java");
+//        languages.add("aspectj");
+//        languages.add("csharp");
+//        languages.add("groovy");
+//            instance.configureArchetypeCreation (
+//                mavenProject,
+//                Boolean.FALSE,
+//                commandLineProperties,
+//                propertyFile,
+//                languages
+//            );
+//
+//            fail ( "Exception must be thrown" );
+//        }
+//        catch ( ArchetypeNotDefined e )
+//        {
+//            assertEquals (
+//                "Exception not correct",
+//                "The archetype is not defined",
+//                e.getMessage ()
+//            );
+//        }
+//    }
+
+    public void testBatchModeDefinedAndConfigured()
+        throws
+        Exception
+    {
+        System.out.println( "testBatchModePackageDefault" );
+
+        String project = "configure-creation-6";
+        File projectFile = getProjectFile( project );
+        File projectFileSample = getProjectSampleFile( project );
+        copy( projectFileSample, projectFile );
+        FileUtils.deleteDirectory( new File( projectFile.getParentFile(), "target" ) );
+
+        MavenProject mavenProject = loadProject( projectFile );
+
+        DefaultArchetypeCreationConfigurator instance =
+            (DefaultArchetypeCreationConfigurator) lookup( ArchetypeCreationConfigurator.ROLE );
+        instanceDefined( instance );
+
+        Properties commandLineProperties = new Properties();
+
+        File propertyFile = getPropertiesFile( project );
+        File propertyFileSample = getPropertiesSampleFile( project );
+        copy( propertyFileSample, propertyFile );
+
+        languages = new ArrayList();
+        languages.add( "java" );
+        languages.add( "aspectj" );
+        languages.add( "csharp" );
+        languages.add( "groovy" );
+        instance.configureArchetypeCreation(
+            mavenProject,
+            Boolean.FALSE,
+            commandLineProperties,
+            propertyFile,
+            languages
+        );
+
+        Properties properties = loadProperties( propertyFile );
+
+        assertEquals(
+            "org.apache.maven.archetype",
+            properties.getProperty( Constants.ARCHETYPE_GROUP_ID )
+        );
+        assertEquals(
+            "maven-archetype-test",
+            properties.getProperty( Constants.ARCHETYPE_ARTIFACT_ID )
+        );
+        assertEquals( "1.0", properties.getProperty( Constants.ARCHETYPE_VERSION ) );
+        assertEquals( "some.group.id", properties.getProperty( Constants.GROUP_ID ) );
+        assertEquals( "some-artifact-id", properties.getProperty( Constants.ARTIFACT_ID ) );
+        assertEquals( "1.0", properties.getProperty( Constants.VERSION ) );
+        assertEquals( "org.codehaus.mojo", properties.getProperty( Constants.PACKAGE ) );
+    }
+
+    public void testBatchModePackageDefault()
+        throws
+        Exception
+    {
+        System.out.println( "testBatchModePackageDefault" );
+
+        String project = "configure-creation-5";
+        File projectFile = getProjectFile( project );
+        File projectFileSample = getProjectSampleFile( project );
+        copy( projectFileSample, projectFile );
+        FileUtils.deleteDirectory( new File( projectFile.getParentFile(), "target" ) );
+
+        MavenProject mavenProject = loadProject( projectFile );
+
+        DefaultArchetypeCreationConfigurator instance =
+            (DefaultArchetypeCreationConfigurator) lookup( ArchetypeCreationConfigurator.ROLE );
+        instanceDefined( instance );
+
+        Properties commandLineProperties = new Properties();
+
+        File propertyFile = getPropertiesFile( project );
+        File propertyFileSample = getPropertiesSampleFile( project );
+        copy( propertyFileSample, propertyFile );
+
+        languages = new ArrayList();
+        languages.add( "java" );
+        languages.add( "aspectj" );
+        languages.add( "csharp" );
+        languages.add( "groovy" );
+        instance.configureArchetypeCreation(
+            mavenProject,
+            Boolean.FALSE,
+            commandLineProperties,
+            propertyFile,
+            languages
+        );
+
+        Properties properties = loadProperties( propertyFile );
+
+        assertEquals(
+            "org.apache.maven.archetype",
+            properties.getProperty( Constants.ARCHETYPE_GROUP_ID )
+        );
+        assertEquals(
+            "maven-archetype-test",
+            properties.getProperty( Constants.ARCHETYPE_ARTIFACT_ID )
+        );
+        assertEquals( "1.0", properties.getProperty( Constants.ARCHETYPE_VERSION ) );
+        assertEquals( "some.group.id", properties.getProperty( Constants.GROUP_ID ) );
+        assertEquals( "some-artifact-id", properties.getProperty( Constants.ARTIFACT_ID ) );
+        assertEquals( "1.0", properties.getProperty( Constants.VERSION ) );
+        assertEquals( "org.apache.maven.archetype", properties.getProperty( Constants.PACKAGE ) );
+    }
+// Commented out since no exception are thrown if using defaults to all values
+//    public void testBatchModePackageDefaultToEmpty ()
+//    throws Exception
+//    {
+//        System.out.println ( "testBatchModePackageDefaultToEmpty" );
+//
+//        String project = "configure-creation-4";
+//        File projectFile = getProjectFile ( project );
+//        File projectFileSample = getProjectSampleFile ( project );
+//        copy ( projectFileSample, projectFile );
+//        FileUtils.deleteDirectory ( new File ( projectFile.getParentFile (), "target" ) );
+//
+//        MavenProject mavenProject = loadProject ( projectFile );
+//
+//        DefaultArchetypeCreationConfigurator instance =
+//            (DefaultArchetypeCreationConfigurator) lookup ( ArchetypeCreationConfigurator.ROLE );
+//        instanceDefined ( instance );
+//
+//        Properties commandLineProperties = new Properties ();
+//
+//        File propertyFile = getPropertiesFile ( project );
+//        File propertyFileSample = getPropertiesSampleFile ( project );
+//        copy ( propertyFileSample, propertyFile );
+//
+//        try
+//        {
+//        languages = new ArrayList();
+//        languages.add("java");
+//        languages.add("aspectj");
+//        languages.add("csharp");
+//        languages.add("groovy");
+//            instance.configureArchetypeCreation (
+//                mavenProject,
+//                Boolean.FALSE,
+//                commandLineProperties,
+//                propertyFile,
+//                languages
+//            );
+//
+//            fail ( "Exception must be thrown" );
+//        }
+//        catch ( ArchetypeNotConfigured e )
+//        {
+//            assertEquals (
+//                "Exception not correct",
+//                "The archetype is not configured",
+//                e.getMessage ()
+//            );
+//        }
+//    }
+// Commented out since no exception are thrown if using defaults to all values
+//    public void testBatchModePropertyFileMissing ()
+//    throws Exception
+//    {
+//        System.out.println ( "testBatchModePropertyFileMissing" );
+//
+//        String project = "configure-creation-1";
+//        File projectFile = getProjectFile ( project );
+//        File projectFileSample = getProjectSampleFile ( project );
+//        copy ( projectFileSample, projectFile );
+//        FileUtils.deleteDirectory ( new File ( projectFile.getParentFile (), "target" ) );
+//
+//        MavenProject mavenProject = loadProject ( projectFile );
+//
+//        DefaultArchetypeCreationConfigurator instance =
+//            (DefaultArchetypeCreationConfigurator) lookup ( ArchetypeCreationConfigurator.ROLE );
+//        instanceDefined ( instance );
+//
+//        Properties commandLineProperties = new Properties ();
+//
+//        File propertyFile = getPropertiesFile ( project );
+//        assertTrue ( !propertyFile.exists () || propertyFile.delete () );
+//
+//        try
+//        {
+//        languages = new ArrayList();
+//        languages.add("java");
+//        languages.add("aspectj");
+//        languages.add("csharp");
+//        languages.add("groovy");
+//            instance.configureArchetypeCreation (
+//                mavenProject,
+//                Boolean.FALSE,
+//                commandLineProperties,
+//                propertyFile,
+//                languages
+//            );
+//
+//            fail ( "Exception must be thrown" );
+//        }
+//        catch ( ArchetypeNotDefined e )
+//        {
+//            assertEquals (
+//                "Exception not correct",
+//                "The archetype is not defined",
+//                e.getMessage ()
+//            );
+//        }
+//    }
+
+    public void testInteractiveModeNotConfirm()
+        throws
+        Exception
+    {
+        System.out.println( "testInteractiveModeNotConfirm" );
+
+        String project = "configure-creation-8";
+        File projectFile = getProjectFile( project );
+        File projectFileSample = getProjectSampleFile( project );
+        copy( projectFileSample, projectFile );
+        FileUtils.deleteDirectory( new File( projectFile.getParentFile(), "target" ) );
+
+        MavenProject mavenProject = loadProject( projectFile );
+
+        DefaultArchetypeCreationConfigurator instance =
+            (DefaultArchetypeCreationConfigurator) lookup( ArchetypeCreationConfigurator.ROLE );
+        instanceDefined( instance );
+
+        Properties commandLineProperties = new Properties();
+
+        File propertyFile = getPropertiesFile( project );
+        File propertyFileSample = getPropertiesSampleFile( project );
+        copy( propertyFileSample, propertyFile );
+
+        MockPrompter prompter = new MockPrompter();
+        prompter.addAnswer( "N" );
+        prompter.addAnswer( "N" );
+        prompter.addAnswer( "org.apache.maven.archetypes2" );
+        prompter.addAnswer( "maven-archetype-test2" );
+        prompter.addAnswer( "1.0.2" );
+        prompter.addAnswer( "some.group.id2" );
+        prompter.addAnswer( "some-artifact-id2" );
+        prompter.addAnswer( "1.0.2" );
+        prompter.addAnswer( "org.codehaus" );
+        prompter.addAnswer( "Y" );
+        prompter.addAnswer( "aProperty" );
+        prompter.addAnswer( "some.value" );
+        prompter.addAnswer( "N" );
+        prompter.addAnswer( "Y" );
+        setVariableValueToObject(
+            getVariableValueFromObject( instance, "archetypeCreationQueryer" ),
+            "prompter",
+            prompter
+        );
+
+        languages = new ArrayList();
+        languages.add( "java" );
+        languages.add( "aspectj" );
+        languages.add( "csharp" );
+        languages.add( "groovy" );
+        instance.configureArchetypeCreation(
+            mavenProject,
+            Boolean.TRUE,
+            commandLineProperties,
+            propertyFile,
+            languages
+        );
+
+        Properties properties = loadProperties( propertyFile );
+
+        assertEquals(
+            "org.apache.maven.archetypes2",
+            properties.getProperty( Constants.ARCHETYPE_GROUP_ID )
+        );
+        assertEquals(
+            "maven-archetype-test2",
+            properties.getProperty( Constants.ARCHETYPE_ARTIFACT_ID )
+        );
+        assertEquals( "1.0.2", properties.getProperty( Constants.ARCHETYPE_VERSION ) );
+        assertEquals( "some.group.id2", properties.getProperty( Constants.GROUP_ID ) );
+        assertEquals( "some-artifact-id2", properties.getProperty( Constants.ARTIFACT_ID ) );
+        assertEquals( "1.0.2", properties.getProperty( Constants.VERSION ) );
+        assertEquals( "org.codehaus", properties.getProperty( Constants.PACKAGE ) );
+        assertEquals( "some.value", properties.getProperty( "aProperty" ) );
+
+        assertEquals( 8, properties.size() );
+    }
+// Commented out if using defaults to all values => change the prompt question order
+//    public void testInteractiveModePropertyFileMissing ()
+//    throws Exception
+//    {
+//        System.out.println ( "testInteractiveModePropertyFileMissing" );
+//
+//        String project = "configure-creation-7";
+//        File projectFile = getProjectFile ( project );
+//        File projectFileSample = getProjectSampleFile ( project );
+//        copy ( projectFileSample, projectFile );
+//        FileUtils.deleteDirectory ( new File ( projectFile.getParentFile (), "target" ) );
+//
+//        MavenProject mavenProject = loadProject ( projectFile );
+//
+//        DefaultArchetypeCreationConfigurator instance =
+//            (DefaultArchetypeCreationConfigurator) lookup ( ArchetypeCreationConfigurator.ROLE );
+//        instanceDefined ( instance );
+//
+//        Properties commandLineProperties = new Properties ();
+//
+//        File propertyFile = getPropertiesFile ( project );
+//        assertTrue ( !propertyFile.exists () || propertyFile.delete () );
+//
+//        MockPrompter prompter = new MockPrompter ();
+//        prompter.addAnswer ( "org.apache.maven.archetypes" );
+//        prompter.addAnswer ( "maven-archetype-test" );
+//        prompter.addAnswer ( "1.0" );
+//        prompter.addAnswer ( "some.group.id" );
+//        prompter.addAnswer ( "some-artifact-id" );
+//        prompter.addAnswer ( "1.0" );
+//        prompter.addAnswer ( "N" );
+//        prompter.addAnswer ( "Y" );
+//        setVariableValueToObject (
+//            getVariableValueFromObject ( instance, "archetypeCreationQueryer" ),
+//            "prompter",
+//            prompter
+//        );
+//
+//        languages = new ArrayList();
+//        languages.add("java");
+//        languages.add("aspectj");
+//        languages.add("csharp");
+//        languages.add("groovy");
+//        instance.configureArchetypeCreation (
+//            mavenProject,
+//            Boolean.TRUE,
+//            commandLineProperties,
+//            propertyFile,
+//            languages
+//        );
+//
+//        Properties properties = loadProperties ( propertyFile );
+//
+//        assertEquals (
+//            "org.apache.maven.archetypes",
+//            properties.getProperty ( Constants.ARCHETYPE_GROUP_ID )
+//        );
+//        assertEquals (
+//            "maven-archetype-test",
+//            properties.getProperty ( Constants.ARCHETYPE_ARTIFACT_ID )
+//        );
+//        assertEquals ( "1.0", properties.getProperty ( Constants.ARCHETYPE_VERSION ) );
+//        assertEquals ( "some.group.id", properties.getProperty ( Constants.GROUP_ID ) );
+//        assertEquals ( "some-artifact-id", properties.getProperty ( Constants.ARTIFACT_ID ) );
+//        assertEquals ( "1.0", properties.getProperty ( Constants.VERSION ) );
+//        assertEquals (
+//            "org.apache.maven.archetype",
+//            properties.getProperty ( Constants.PACKAGE )
+//        );
+//
+//        assertEquals ( 7, properties.size () );
+//    }
+
+    protected void tearDown()
+        throws
+        Exception
+    {
+        super.tearDown();
+    }
+
+    protected void setUp()
+        throws
+        Exception
+    {
+        super.setUp();
+
+        localRepository =
+            new DefaultArtifactRepository(
+                "local",
+                new File( getBasedir(), "target/test-classes/repositories/local" ).toURI()
+                    .toString(),
+                new DefaultRepositoryLayout()
+            );
+
+        repositories =
+            Arrays.asList(
+                new ArtifactRepository[]
+                    {
+                        new DefaultArtifactRepository(
+                            "central",
+                            new File( getBasedir(), "target/test-classes/repositories/central" )
+                                .toURI().toString(),
+                            new DefaultRepositoryLayout()
+                        )
+                    }
+            );
+    }
+
+    private void copy( final File in,
+                       final File out )
+        throws
+        IOException
+    {
+        assertTrue( !out.exists() || out.delete() );
+        assertFalse( out.exists() );
+        IOUtil.copy( new FileReader( in ), new FileWriter( out ) );
+        assertTrue( out.exists() );
+        assertTrue( in.exists() );
+    }
+
+    private void instanceDefined( DefaultArchetypeCreationConfigurator instance )
+        throws
+        IllegalAccessException
+    {
+        assertNotNull( instance );
+        assertNotNull( getVariableValueFromObject( instance, "archetypeCreationQueryer" ) );
+        assertNotNull( getVariableValueFromObject( instance, "archetypeFactory" ) );
+        assertNotNull( getVariableValueFromObject( instance, "archetypePropertiesManager" ) );
+        assertNotNull( getVariableValueFromObject( instance, "archetypeFilesResolver" ) );
+    }
+
+    private MavenProject loadProject( final File projectFile )
+        throws
+        ArtifactNotFoundException,
+        Exception,
+        ArtifactResolutionException,
+        ProjectBuildingException
+    {
+        MavenProjectBuilder builder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE );
+        return builder.buildWithDependencies( projectFile, localRepository, null );
+    }
+
+    private Properties loadProperties( File propertyFile )
+        throws
+        IOException,
+        FileNotFoundException
+    {
+        Properties properties = new Properties();
+        properties.load( new FileInputStream( propertyFile ) );
+        return properties;
+    }
+
+    private File getProjectFile( String project )
+    {
+        return new File( getBasedir(), "target/test-classes/projects/" + project + "/pom.xml" );
+    }
+
+    private File getProjectSampleFile( String project )
+    {
+        return
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/pom.xml.sample"
+            );
+    }
+
+    private File getPropertiesFile( String project )
+    {
+        return
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/archetype.properties"
+            );
+    }
+
+    private File getPropertiesSampleFile( final String project )
+    {
+        File propertyFileSample =
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/archetype.properties.sample"
+            );
+        return propertyFileSample;
+    }
+}

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreationConfiguratorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java Tue Sep 25 11:25:05 2007
@@ -0,0 +1,406 @@
+/*
+ * 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.apache.maven.archetype.creator;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class DefaultArchetypeCreatorTest
+    extends AbstractMojoTestCase
+{
+    private List filtereds;
+
+    private List languages;
+    private DefaultArtifactRepository localRepository;
+
+    private List repositories;
+
+    public void testCreateFilesetArchetype()
+        throws
+        Exception
+    {
+        System.out.println( "testCreateFilesetArchetype" );
+
+        MavenProjectBuilder builder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE );
+
+        String project = "create-3";
+
+        File projectFile = getProjectFile( project );
+        File projectFileSample = getProjectSampleFile( project );
+        copy( projectFileSample, projectFile );
+
+        FileUtils.deleteDirectory( new File( projectFile.getParentFile(), "target" ) );
+
+        File propertyFile = getPropertiesFile( project );
+        File propertyFileSample = getPropertiesSampleFile( project );
+        copy( propertyFileSample, propertyFile );
+
+        MavenProject mavenProject =
+            builder.buildWithDependencies( projectFile, localRepository, null );
+        FilesetArchetypeCreator instance =
+            (FilesetArchetypeCreator) lookup( ArchetypeCreator.class.getName(), "fileset" );
+
+        languages = new ArrayList();
+        languages.add( "java" );
+        languages.add( "aspectj" );
+        languages.add( "csharp" );
+        languages.add( "groovy" );
+        languages.add( "resources" );
+
+        filtereds = new ArrayList();
+        filtereds.add( "java" );
+        filtereds.add( "xml" );
+        filtereds.add( "txt" );
+        filtereds.add( "groovy" );
+        filtereds.add( "cs" );
+        filtereds.add( "mdo" );
+        filtereds.add( "aj" );
+        filtereds.add( "jsp" );
+        filtereds.add( "js" );
+        filtereds.add( "gsp" );
+        filtereds.add( "vm" );
+        filtereds.add( "html" );
+        filtereds.add( "xhtml" );
+        filtereds.add( "properties" );
+        filtereds.add( ".classpath" );
+        filtereds.add( ".project" );
+        instance.createArchetype(
+            mavenProject,
+            propertyFile,
+            languages,
+            filtereds,
+            "UTF-8",
+            true,
+            false,
+            false,
+            false,
+            getFile( project, "archetype-registry.xml" )
+        );
+
+        File template;
+
+        template = getTemplateFile( project, "pom.xml" );
+        assertExists( template );
+        assertContent( template, "${groupId}" );
+        assertContent( template, "${artifactId}" );
+        assertContent( template, "${version}" );
+        assertContent( template, "Maven ArchetypeNG Test create-3" );
+        assertContent( template, "<packaging>pom</packaging>" );
+        assertNotContent( template, "<parent>" );
+
+        template = getTemplateFile( project, "src/site/site.xml" );
+        assertExists( template );
+        assertContent( template, "<!-- ${someProperty} -->" );
+
+        template = getTemplateFile( project, "src/site/resources/site.png" );
+        assertExists( template );
+        assertNotContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, ".classpath" );
+        assertExists( template );
+        assertNotContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "profiles.xml" );
+        assertExists( template );
+        assertContent( template, "<!-- ${someProperty} -->" );
+
+        template = getTemplateFile( project, "libs/pom.xml" );
+        assertExists( template );
+        assertContent( template, "${groupId}" );
+        assertContent( template, "${artifactId}" );
+        assertContent( template, "${version}" );
+        assertContent( template, "Maven ArchetypeNG Test create-3-libraries" );
+        assertContent( template, "<packaging>pom</packaging>" );
+        assertNotContent( template, "<parent>" );
+
+        template = getTemplateFile( project, "libs/prj-a/pom.xml" );
+        assertExists( template );
+        assertContent( template, "${groupId}" );
+        assertContent( template, "${artifactId}" );
+        assertContent( template, "${version}" );
+        assertContent( template, "Maven ArchetypeNG Test create-3-libraries-project-a" );
+        assertNotContent( template, "<packaging>pom</packaging>" );
+        assertNotContent( template, "<parent>" );
+
+        template = getTemplateFile( project, "libs/prj-a/src/main/mdo/descriptor.xml" );
+        assertExists( template );
+        assertContent( template, "<!-- ${someProperty} -->" );
+
+        template = getTemplateFile( project, "libs/prj-b/pom.xml" );
+        assertExists( template );
+        assertContent( template, "${groupId}" );
+        assertContent( template, "${artifactId}" );
+        assertContent( template, "${version}" );
+        assertContent( template, "Maven ArchetypeNG Test create-3-libraries-project-b" );
+        assertNotContent( template, "<packaging>pom</packaging>" );
+        assertNotContent( template, "<parent>" );
+
+        template = getTemplateFile( project, "libs/prj-b/src/main/java/test/com/Component.java" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "libs/prj-b/src/main/java/test/com/package.html" );
+        assertExists( template );
+        assertContent( template, "<!-- ${someProperty} -->" );
+
+        template =
+            getTemplateFile( project, "libs/prj-b/src/test/java/test/common/ComponentTest.java" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "application/pom.xml" );
+        assertExists( template );
+        assertContent( template, "${groupId}" );
+        assertContent( template, "${artifactId}" );
+        assertContent( template, "${version}" );
+        assertContent( template, "Maven ArchetypeNG Test create-3-application" );
+        assertNotContent( template, "<packaging>pom</packaging>" );
+        assertNotContent( template, "<parent>" );
+
+        template = getTemplateFile( project, "application/src/main/java/Main.java" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile(
+                project,
+                "application/src/main/java/test/application/Application.java"
+            );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile(
+                project,
+                "application/src/main/java/test/application/audios/Application.ogg"
+            );
+        assertExists( template );
+        assertNotContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile(
+                project,
+                "application/src/main/java/test/application/images/Application.png"
+            );
+        assertExists( template );
+        assertNotContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "application/src/main/resources/log4j.properties" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile( project, "application/src/main/resources/META-INF/MANIFEST.MF" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile( project, "application/src/main/resources/test/application/some/Gro.groovy" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "application/src/main/resources/splash.png" );
+        assertExists( template );
+        assertNotContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "application/src/test/java/TestAll.java" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile(
+                project,
+                "application/src/test/java/test/application/ApplicationTest.java"
+            );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "application/src/it-test/java/test/ItTest1.java" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template = getTemplateFile( project, "application/src/it-test/java/ItTestAll.java" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+
+        template =
+            getTemplateFile( project, "application/src/it-test/resources/ItTest1Result.txt" );
+        assertExists( template );
+        assertContent( template, "${someProperty}" );
+    }
+
+    protected void tearDown()
+        throws
+        Exception
+    {
+        super.tearDown();
+    }
+
+    protected void setUp()
+        throws
+        Exception
+    {
+        super.setUp();
+
+        localRepository =
+            new DefaultArtifactRepository(
+                "local",
+                new File( getBasedir(), "target/test-classes/repositories/local" ).toURI()
+                    .toString(),
+                new DefaultRepositoryLayout()
+            );
+
+        repositories =
+            Arrays.asList(
+                new ArtifactRepository[]
+                    {
+                        new DefaultArtifactRepository(
+                            "central",
+                            new File( getBasedir(), "target/test-classes/repositories/central" )
+                                .toURI().toString(),
+                            new DefaultRepositoryLayout()
+                        )
+                    }
+            );
+    }
+
+    private boolean assertContent( File template,
+                                   String content )
+        throws
+        FileNotFoundException,
+        IOException
+    {
+        String templateContent = IOUtil.toString( new FileReader( template ) );
+        return StringUtils.countMatches( templateContent, content ) > 0;
+    }
+
+    private void assertExists( File file )
+    {
+        assertTrue( "File doesn't exist:" + file.getAbsolutePath(), file.exists() );
+    }
+
+    private boolean assertNotContent( File template,
+                                      String content )
+        throws
+        FileNotFoundException,
+        IOException
+    {
+        return !assertContent( template, content );
+    }
+
+    private void copy( File in,
+                       File out )
+        throws
+        IOException,
+        FileNotFoundException
+    {
+        assertTrue( !out.exists() || out.delete() );
+        assertFalse( out.exists() );
+        IOUtil.copy( new FileReader( in ), new FileWriter( out ) );
+        assertTrue( out.exists() );
+        assertTrue( in.exists() );
+    }
+
+    private File getDescriptorFile( String project )
+    {
+        return
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/target/generated-sources/archetypeng/"
+                    + "src/main/resources/"
+                    + "META-INF/maven/archetype.xml"
+            );
+    }
+
+    private String getPath( String basedir,
+                            String child )
+    {
+        return new File( basedir, child ).getPath();
+    }
+
+    private File getFile( String project,
+                          String file )
+    {
+        return new File( getBasedir(), "target/test-classes/projects/" + project + "/" + file );
+    }
+
+    private File getProjectFile( String project )
+    {
+        return new File( getBasedir(), "target/test-classes/projects/" + project + "/pom.xml" );
+    }
+
+    private File getProjectSampleFile( String project )
+    {
+        return
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/pom.xml.sample"
+            );
+    }
+
+    private File getPropertiesFile( String project )
+    {
+        return
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/archetype.properties"
+            );
+    }
+
+    private File getPropertiesSampleFile( final String project )
+    {
+        File propertyFileSample =
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/archetype.properties.sample"
+            );
+        return propertyFileSample;
+    }
+
+    private File getTemplateFile( String project,
+                                  String template )
+    {
+        return
+            new File(
+                getBasedir(),
+                "target/test-classes/projects/" + project + "/target/generated-sources/archetypeng/"
+                    + "src/main/resources/"
+                    + "archetype-resources/" + template
+            );
+    }
+}

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/MockPrompter.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/MockPrompter.java?rev=579343&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/MockPrompter.java (added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/MockPrompter.java Tue Sep 25 11:25:05 2007
@@ -0,0 +1,112 @@
+/*
+ * 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.apache.maven.archetype.creator;
+
+import org.codehaus.plexus.components.interactivity.Prompter;
+import org.codehaus.plexus.components.interactivity.PrompterException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MockPrompter
+    implements Prompter
+{
+    List prompts = new ArrayList();
+
+    public void addAnswer( String prompt )
+    {
+        prompts.add( prompt );
+    }
+
+    public String prompt( String string )
+        throws
+        PrompterException
+    {
+        System.err.println( string );
+
+        String answer = (String) prompts.remove( 0 );
+
+        System.err.println( "> " + answer );
+        return answer;
+    }
+
+    public String prompt( String string,
+                          String string0 )
+        throws
+        PrompterException
+    {
+        System.err.println( string );
+        System.err.println( string0 );
+
+        String answer = (String) prompts.remove( 0 );
+
+        System.err.println( "> " + answer );
+        return answer;
+    }
+
+    public String prompt( String string,
+                          List list )
+        throws
+        PrompterException
+    {
+        System.err.println( string );
+        System.err.println( list );
+
+        String answer = (String) prompts.remove( 0 );
+
+        System.err.println( "> " + answer );
+        return answer;
+    }
+
+    public String prompt( String string,
+                          List list,
+                          String string0 )
+        throws
+        PrompterException
+    {
+        System.err.println( string );
+        System.err.println( list );
+        System.err.println( string0 );
+
+        String answer = (String) prompts.remove( 0 );
+
+        System.err.println( "> " + answer );
+        return answer;
+    }
+
+    public String promptForPassword( String string )
+        throws
+        PrompterException
+    {
+        System.err.println( string );
+
+        String answer = (String) prompts.remove( 0 );
+
+        System.err.println( "> " + answer );
+        return answer;
+    }
+
+    public void showMessage( String string )
+        throws
+        PrompterException
+    {
+        System.err.println( string );
+    }
+}

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/test/java/org/apache/maven/archetype/creator/MockPrompter.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message