This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch noise
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git

commit 0daac4ecc6e2b58d35fa7f98653772d83b4d2ab6
Author: Elliotte Rusty Harold <elh...@ibiblio.org>
AuthorDate: Thu Nov 28 08:30:30 2024 -0500

    Remove a lot of old println detritus
---
 .../maven/archetype/common/util/ListScanner.java   | 12 +++--------
 .../common/TestDefaultArchetypeFilesResolver.java  |  5 -----
 .../archetype/common/util/TestXMLOutputter.java    |  2 --
 .../generator/DefaultArchetypeGeneratorTest.java   | 24 ----------------------
 .../DefaultRepositoryCrawlerTest.java              | 19 -----------------
 .../archetype/test/ArchetypeGenerationTest.java    |  2 --
 6 files changed, 3 insertions(+), 61 deletions(-)

diff --git 
a/archetype-common/src/main/java/org/apache/maven/archetype/common/util/ListScanner.java
 
b/archetype-common/src/main/java/org/apache/maven/archetype/common/util/ListScanner.java
index 79dc983b..3d26f110 100644
--- 
a/archetype-common/src/main/java/org/apache/maven/archetype/common/util/ListScanner.java
+++ 
b/archetype-common/src/main/java/org/apache/maven/archetype/common/util/ListScanner.java
@@ -386,10 +386,6 @@ public class ListScanner {
      *                               <code>null</code>, doesn't exist, or 
isn't a directory).
      */
     public List<String> scan(List<String> files) throws IllegalStateException {
-        //        System.err.println("Scanning \nbasedir="+basedir +
-        //                " \nincludes=" + java.util.Arrays.toString(includes) 
+
-        //                " \nexcludes=" + java.util.Arrays.toString(excludes) 
+
-        //                " \non files="+files);
         if (basedir == null) {
             throw new IllegalStateException("No basedir set");
         }
@@ -410,16 +406,15 @@ public class ListScanner {
                 result.add(fileName);
             }
         }
-        //        System.err.println("Result "+result+"\n\n\n");
         return result;
     }
 
     /**
-     * Tests whether or not a name matches against at least one exclude 
pattern.
+     * Tests whether a name matches at least one exclude pattern.
      *
-     * @param name The name to match. Must not be <code>null</code>.
+     * @param name The name to match. Must not be <code>null</code>
      * @return <code>true</code> when the name matches against at least one 
exclude pattern, or
-     *         <code>false</code> otherwise.
+     *         <code>false</code> otherwise
      */
     protected boolean isExcluded(String name) {
         return matchesPatterns(name, excludes);
@@ -455,7 +450,6 @@ public class ListScanner {
 
         for (int i = 0; i < patterns.length; i++) {
             path = PathUtils.convertPathForOS(baseDir + patterns[i]);
-            //            System.err.println("path="+path);
             if (matchPath(path, name, isCaseSensitive)) {
                 return true;
             }
diff --git 
a/archetype-common/src/test/java/org/apache/maven/archetype/common/TestDefaultArchetypeFilesResolver.java
 
b/archetype-common/src/test/java/org/apache/maven/archetype/common/TestDefaultArchetypeFilesResolver.java
index 874d3b94..01fea495 100644
--- 
a/archetype-common/src/test/java/org/apache/maven/archetype/common/TestDefaultArchetypeFilesResolver.java
+++ 
b/archetype-common/src/test/java/org/apache/maven/archetype/common/TestDefaultArchetypeFilesResolver.java
@@ -50,15 +50,10 @@ public class TestDefaultArchetypeFilesResolver extends 
TestCase {
         archetypeResources.add("src/test/mdo/AppTest.mdo");
         archetypeResources.add("src/test/resources/AppTest.properties");
 
-        System.out.println("FileSet:" + fileSet);
-        System.out.println("Resources:" + archetypeResources);
-
         ArchetypeFilesResolver resolver = new DefaultArchetypeFilesResolver();
 
         List<String> fileSetResources = resolver.filterFiles("", fileSet, 
archetypeResources);
 
-        System.out.println("Result:" + fileSetResources);
-
         assertEquals(2, fileSetResources.size());
     }
 }
diff --git 
a/archetype-common/src/test/java/org/apache/maven/archetype/common/util/TestXMLOutputter.java
 
b/archetype-common/src/test/java/org/apache/maven/archetype/common/util/TestXMLOutputter.java
index 98c1d134..e714406c 100644
--- 
a/archetype-common/src/test/java/org/apache/maven/archetype/common/util/TestXMLOutputter.java
+++ 
b/archetype-common/src/test/java/org/apache/maven/archetype/common/util/TestXMLOutputter.java
@@ -41,8 +41,6 @@ public class TestXMLOutputter extends TestCase {
         StringWriter sw = new StringWriter();
         new XMLOutputter().output(doc, sw);
 
-        System.out.println("Resulting content is:\n\n\'" + sw + "\'\n\n");
-
         assertTrue(sw.toString().indexOf(content) > -1);
     }
 }
diff --git 
a/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
 
b/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
index fb9d5cc0..a91c6d12 100644
--- 
a/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
+++ 
b/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
@@ -102,8 +102,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testArchetypeNotDefined() throws Exception {
-        System.out.println("testArchetypeNotDefined");
-
         Archetype archetype = new Archetype("archetypes", null, "1.0");
 
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-2", archetype);
@@ -117,8 +115,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypeCompleteWithoutParent() throws Exception {
-        System.out.println("testGenerateArchetypeCompleteWithoutParent");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-4", ARCHETYPE_BASIC);
 
         FileUtils.forceDelete(projectDirectory);
@@ -144,8 +140,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypeCompleteWithParent() throws Exception {
-        System.out.println("testGenerateArchetypeCompleteWithParent");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-5", ARCHETYPE_BASIC);
 
         File projectFile = getProjectFile();
@@ -169,8 +163,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypePartialOnChild() throws Exception {
-        System.out.println("testGenerateArchetypePartialOnChild");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-8", ARCHETYPE_PARTIAL);
 
         File parentProjectFile = getProjectFile();
@@ -197,8 +189,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypePartialOnChildDontOverride() throws 
Exception {
-        System.out.println("testGenerateArchetypePartialOnChildDontOverride");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-9", ARCHETYPE_PARTIAL);
 
         File projectFile = new File(projectDirectory, "pom.xml");
@@ -224,8 +214,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypePartialOnParent() throws Exception {
-        System.out.println("testGenerateArchetypePartialOnParent");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-7", ARCHETYPE_PARTIAL);
 
         File projectFile = new File(outputDirectory, "pom.xml");
@@ -246,8 +234,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypePartialWithoutPoms() throws Exception {
-        System.out.println("testGenerateArchetypePartialWithoutPoms");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-6", ARCHETYPE_PARTIAL);
 
         File projectFile = new File(projectDirectory, "pom.xml");
@@ -264,8 +250,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypeSite() throws Exception {
-        System.out.println("testGenerateArchetypeSite");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-10", ARCHETYPE_SITE);
 
         File projectFile = new File(projectDirectory, "pom.xml");
@@ -285,8 +269,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateFileSetArchetype() throws Exception {
-        System.out.println("testGenerateFileSetArchetype");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-12", ARCHETYPE_FILESET);
 
         File projectFile = new File(projectDirectory, "pom.xml");
@@ -369,8 +351,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateOldArchetype() throws Exception {
-        System.out.println("testGenerateOldArchetype");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-11", ARCHETYPE_OLD);
 
         File projectFile = new File(projectDirectory, "pom.xml");
@@ -391,8 +371,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testPropertiesNotDefined() throws Exception {
-        System.out.println("testPropertiesNotDefined");
-
         ArchetypeGenerationRequest request = 
createArchetypeGenerationRequest("generate-3", ARCHETYPE_BASIC);
 
         request.setProperties(new Properties());
@@ -406,8 +384,6 @@ public class DefaultArchetypeGeneratorTest extends 
AbstractMojoTestCase {
     }
 
     public void testGenerateArchetypeWithPostScriptIncluded() throws Exception 
{
-        System.out.println("testGenerateArchetypeWithPostScriptIncluded");
-
         ArchetypeGenerationRequest request =
                 createArchetypeGenerationRequest("generate-13", 
ARCHETYPE_FILESET_WITH_POSTCREATE_SCRIPT);
 
diff --git 
a/archetype-common/src/test/java/org/apache/maven/archetype/repositorycrawler/DefaultRepositoryCrawlerTest.java
 
b/archetype-common/src/test/java/org/apache/maven/archetype/repositorycrawler/DefaultRepositoryCrawlerTest.java
index 571cb28f..e5827b27 100644
--- 
a/archetype-common/src/test/java/org/apache/maven/archetype/repositorycrawler/DefaultRepositoryCrawlerTest.java
+++ 
b/archetype-common/src/test/java/org/apache/maven/archetype/repositorycrawler/DefaultRepositoryCrawlerTest.java
@@ -31,8 +31,6 @@ public class DefaultRepositoryCrawlerTest extends 
AbstractMojoTestCase {
      * Test of crawl method, of class DefaultRepositoryCrawler.
      */
     public void testCrawl() throws Exception {
-        System.out.println("crawl");
-
         File repository = 
getTestFile("target/test-classes/repositories/central");
         RepositoryCrawler instance = (RepositoryCrawler) 
lookup(RepositoryCrawler.class.getName());
 
@@ -46,21 +44,4 @@ public class DefaultRepositoryCrawlerTest extends 
AbstractMojoTestCase {
         //        instance.writeCatalog(result, new File(repository, 
"archetype-catalog.xml"));
     }
 
-    //    public void testCrawl2 ()
-    //    throws Exception
-    //    {
-    //        System.out.println ( "\n\n\n\n\n\ncrawl2" );
-    //
-    //        File repository = new File("/home/rafale/.m2/repository");
-    //                //getTestFile ( 
"target/test-classes/repositories/central" );
-    //        RepositoryCrawler instance =
-    //            (RepositoryCrawler) lookup ( RepositoryCrawler.class.getName 
() );
-    //
-    //        ArchetypeCatalog expResult = null;
-    //        ArchetypeCatalog result = instance.crawl ( repository );
-    //        System.err.println("result = "+result);
-    //        assertEquals ( expResult, result );
-    //        // TODO review the generated test code and remove the default 
call to fail.
-    ////        fail ( "The test case is a prototype." );
-    //    }
 }
diff --git 
a/archetype-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
 
b/archetype-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
index 537cc795..1cc2cfb1 100644
--- 
a/archetype-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
+++ 
b/archetype-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java
@@ -53,14 +53,12 @@ public class ArchetypeGenerationTest extends PlexusTestCase 
{
 
         ArchetypeCatalog catalog = 
archetype.getLocalCatalog(repositorySession);
 
-        System.err.println("archetypes => " + catalog.getArchetypes());
         // Here I am just grabbing a OldArchetype but in a UI you would take 
the OldArchetype objects and present
         // them to the user.
 
         Archetype selection =
                 catalog.getArchetypes().get(catalog.getArchetypes().size() - 
1);
 
-        System.err.println("Selected OldArchetype = " + selection);
         // Now you will present a dialog, or whatever, and grab the following 
values.
 
         String groupId = "com.mycompany";

Reply via email to