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 void setIncludes(String includes) { * null, doesn't exist, or isn't a directory). */ public List scan(List 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 List scan(List files) throws IllegalStateException { 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 null. + * @param name The name to match. Must not be null * @return true when the name matches against at least one exclude pattern, or - * false otherwise. + * false otherwise */ protected boolean isExcluded(String name) { return matchesPatterns(name, excludes); @@ -455,7 +450,6 @@ protected boolean matchesPatterns(String name, String[] patterns) { 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 void testResourceFiltering() throws Exception { 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 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 void testOutput_Document_ShouldParseAndOutputCDATASection_NoMods() throws 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 @@ private ArchetypeGenerationResult generateProjectFromArchetypeWithFailure(Archet } 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 void testArchetypeNotDefined() throws Exception { } public void testGenerateArchetypeCompleteWithoutParent() throws Exception { - System.out.println("testGenerateArchetypeCompleteWithoutParent"); - ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-4", ARCHETYPE_BASIC); FileUtils.forceDelete(projectDirectory); @@ -144,8 +140,6 @@ public void testGenerateArchetypeCompleteWithoutParent() throws Exception { } public void testGenerateArchetypeCompleteWithParent() throws Exception { - System.out.println("testGenerateArchetypeCompleteWithParent"); - ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-5", ARCHETYPE_BASIC); File projectFile = getProjectFile(); @@ -169,8 +163,6 @@ public void testGenerateArchetypeCompleteWithParent() throws Exception { } public void testGenerateArchetypePartialOnChild() throws Exception { - System.out.println("testGenerateArchetypePartialOnChild"); - ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-8", ARCHETYPE_PARTIAL); File parentProjectFile = getProjectFile(); @@ -197,8 +189,6 @@ public void testGenerateArchetypePartialOnChild() throws Exception { } 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 void testGenerateArchetypePartialOnChildDontOverride() throws Exception { } 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 void testGenerateArchetypePartialOnParent() throws Exception { } 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 void testGenerateArchetypePartialWithoutPoms() throws Exception { } 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 void testGenerateArchetypeSite() throws Exception { } 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 void testGenerateFileSetArchetype() throws Exception { } 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 void testGenerateOldArchetype() throws Exception { } 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 void testPropertiesNotDefined() throws Exception { } 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..06ebd104 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()); @@ -45,22 +43,4 @@ public void testCrawl() throws Exception { // TODO: should write to another directory // 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 void testProjectGenerationFromAnArchetype() throws Exception { 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";