Author: rafale
Date: Thu Dec 20 06:21:26 2007
New Revision: 605938

URL: http://svn.apache.org/viewvc?rev=605938&view=rev
Log:
moved the internal catalog test in a profile 
it was far too long to execute

Added:
    
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/InternalCatalogArchetypesVerification.java
   (with props)
Modified:
    maven/sandbox/trunk/archetypeng/archetypeng-common/pom.xml
    
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java

Modified: maven/sandbox/trunk/archetypeng/archetypeng-common/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/pom.xml?rev=605938&r1=605937&r2=605938&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetypeng-common/pom.xml (original)
+++ maven/sandbox/trunk/archetypeng/archetypeng-common/pom.xml Thu Dec 20 
06:21:26 2007
@@ -414,8 +414,27 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.2-SNAPSHOT</version>
+        <version>2.2</version>
       </plugin>
     </plugins>
   </reporting>
+  
+  <profiles>
+      <profile>
+          <id>internal-catalog</id>
+          <build>
+              <plugins>
+                  <plugin>
+                      <groupId>org.apache.maven.plugins</groupId>
+                      <artifactId>maven-surefire-plugin</artifactId>
+                      <configuration>
+                          <includes>
+                              <include>**/*Verification.java</include>
+                          </includes>
+                      </configuration>
+                  </plugin>
+              </plugins>
+          </build>          
+      </profile>
+  </profiles>
 </project>

Modified: 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java?rev=605938&r1=605937&r2=605938&view=diff
==============================================================================
--- 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
 (original)
+++ 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
 Thu Dec 20 06:21:26 2007
@@ -108,44 +108,4 @@
         }
     }
     
-    
-
-    public void testInternalCatalog ()
-    throws Exception
-    {
-        ArchetypeRegistryManager registryManager = (ArchetypeRegistryManager) 
lookup( ArchetypeRegistryManager.ROLE );
-
-        ArtifactRepository localRepository = registryManager.createRepository( 
new File( getBasedir(),
-            "target/test-classes/repositories/local" ).toURI().
-            toURL().
-            toExternalForm(),
-            "local-repo" );
-        
-        File outputDirectory = new File(getBasedir(), 
"target/internal-archetypes-projects");
-        outputDirectory.mkdirs();
-        
-        Archetype archetype = (Archetype) lookup ( Archetype.class );
-
-        ArchetypeCatalog result = archetype.getInternalCatalog ();
-
-        Iterator archetypes = result.getArchetypes ().iterator ();
-        int count = 1;
-        while ( archetypes.hasNext () )
-        {
-            org.apache.maven.archetype.catalog.Archetype a =
-                (org.apache.maven.archetype.catalog.Archetype) archetypes.next 
();
-
-            System.err.println("\n\n\n\n\n\nTesting archetype "+a);
-            ArchetypeGenerationRequest request = new 
ArchetypeGenerationRequest ( a )
-            .setGroupId ( "groupId" + count )
-            .setArtifactId ( "artifactId" + count )
-            .setVersion ( "version" + count )
-            .setPackage ( "package" + count )
-            .setOutputDirectory(outputDirectory.getPath())
-            .setLocalRepository( localRepository );
-            archetype.generateProjectFromArchetype ( request );
-            count++;
-            System.err.println("\n\n\n\n\n");
-        }
-    }
 }

Added: 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/InternalCatalogArchetypesVerification.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/InternalCatalogArchetypesVerification.java?rev=605938&view=auto
==============================================================================
--- 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/InternalCatalogArchetypesVerification.java
 (added)
+++ 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/test/java/org/apache/maven/archetype/test/InternalCatalogArchetypesVerification.java
 Thu Dec 20 06:21:26 2007
@@ -0,0 +1,78 @@
+/*
+ * 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.test;
+
+import java.io.File;
+import java.util.Iterator;
+import org.apache.maven.archetype.Archetype;
+import org.apache.maven.archetype.ArchetypeGenerationRequest;
+import org.apache.maven.archetype.catalog.ArchetypeCatalog;
+import org.apache.maven.archetype.common.ArchetypeRegistryManager;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.codehaus.plexus.PlexusTestCase;
+
+/**
+ *
+ * @author rafale
+ */
+public class InternalCatalogArchetypesVerification 
+    extends PlexusTestCase{
+
+    
+
+    public void testInternalCatalog ()
+    throws Exception
+    {
+        ArchetypeRegistryManager registryManager = (ArchetypeRegistryManager) 
lookup( ArchetypeRegistryManager.ROLE );
+
+        ArtifactRepository localRepository = registryManager.createRepository( 
new File( getBasedir(),
+            "target/test-classes/repositories/local" ).toURI().
+            toURL().
+            toExternalForm(),
+            "local-repo" );
+        
+        File outputDirectory = new File(getBasedir(), 
"target/internal-archetypes-projects");
+        outputDirectory.mkdirs();
+        
+        Archetype archetype = (Archetype) lookup ( Archetype.class );
+
+        ArchetypeCatalog result = archetype.getInternalCatalog ();
+
+        Iterator archetypes = result.getArchetypes ().iterator ();
+        int count = 1;
+        while ( archetypes.hasNext () )
+        {
+            org.apache.maven.archetype.catalog.Archetype a =
+                (org.apache.maven.archetype.catalog.Archetype) archetypes.next 
();
+
+            System.err.println("\n\n\n\n\n\nTesting archetype "+a);
+            ArchetypeGenerationRequest request = new 
ArchetypeGenerationRequest ( a )
+            .setGroupId ( "groupId" + count )
+            .setArtifactId ( "artifactId" + count )
+            .setVersion ( "version" + count )
+            .setPackage ( "package" + count )
+            .setOutputDirectory(outputDirectory.getPath())
+            .setLocalRepository( localRepository );
+            archetype.generateProjectFromArchetype ( request );
+            count++;
+            System.err.println("\n\n\n\n\n");
+        }
+    }
+}

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


Reply via email to