Skip to content

Commit e3e970b

Browse files
authored
Remove a lot of old println detritus (apache#246)
* Remove a lot of old println detritus
1 parent 7b4c29c commit e3e970b

File tree

6 files changed

+3
-62
lines changed

6 files changed

+3
-62
lines changed

archetype-common/src/main/java/org/apache/maven/archetype/common/util/ListScanner.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,6 @@ public void setIncludes(String includes) {
386386
* <code>null</code>, doesn't exist, or isn't a directory).
387387
*/
388388
public List<String> scan(List<String> files) throws IllegalStateException {
389-
// System.err.println("Scanning \nbasedir="+basedir +
390-
// " \nincludes=" + java.util.Arrays.toString(includes) +
391-
// " \nexcludes=" + java.util.Arrays.toString(excludes) +
392-
// " \non files="+files);
393389
if (basedir == null) {
394390
throw new IllegalStateException("No basedir set");
395391
}
@@ -410,16 +406,15 @@ public List<String> scan(List<String> files) throws IllegalStateException {
410406
result.add(fileName);
411407
}
412408
}
413-
// System.err.println("Result "+result+"\n\n\n");
414409
return result;
415410
}
416411

417412
/**
418-
* Tests whether or not a name matches against at least one exclude pattern.
413+
* Tests whether a name matches at least one exclude pattern.
419414
*
420-
* @param name The name to match. Must not be <code>null</code>.
415+
* @param name The name to match. Must not be <code>null</code>
421416
* @return <code>true</code> when the name matches against at least one exclude pattern, or
422-
* <code>false</code> otherwise.
417+
* <code>false</code> otherwise
423418
*/
424419
protected boolean isExcluded(String name) {
425420
return matchesPatterns(name, excludes);
@@ -455,7 +450,6 @@ protected boolean matchesPatterns(String name, String[] patterns) {
455450

456451
for (int i = 0; i < patterns.length; i++) {
457452
path = PathUtils.convertPathForOS(baseDir + patterns[i]);
458-
// System.err.println("path="+path);
459453
if (matchPath(path, name, isCaseSensitive)) {
460454
return true;
461455
}

archetype-common/src/test/java/org/apache/maven/archetype/common/TestDefaultArchetypeFilesResolver.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,10 @@ public void testResourceFiltering() throws Exception {
5050
archetypeResources.add("src/test/mdo/AppTest.mdo");
5151
archetypeResources.add("src/test/resources/AppTest.properties");
5252

53-
System.out.println("FileSet:" + fileSet);
54-
System.out.println("Resources:" + archetypeResources);
55-
5653
ArchetypeFilesResolver resolver = new DefaultArchetypeFilesResolver();
5754

5855
List<String> fileSetResources = resolver.filterFiles("", fileSet, archetypeResources);
5956

60-
System.out.println("Result:" + fileSetResources);
61-
6257
assertEquals(2, fileSetResources.size());
6358
}
6459
}

archetype-common/src/test/java/org/apache/maven/archetype/common/util/TestXMLOutputter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ public void testOutput_Document_ShouldParseAndOutputCDATASection_NoMods() throws
4141
StringWriter sw = new StringWriter();
4242
new XMLOutputter().output(doc, sw);
4343

44-
System.out.println("Resulting content is:\n\n\'" + sw + "\'\n\n");
45-
4644
assertTrue(sw.toString().indexOf(content) > -1);
4745
}
4846
}

archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ private ArchetypeGenerationResult generateProjectFromArchetypeWithFailure(Archet
102102
}
103103

104104
public void testArchetypeNotDefined() throws Exception {
105-
System.out.println("testArchetypeNotDefined");
106-
107105
Archetype archetype = new Archetype("archetypes", null, "1.0");
108106

109107
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-2", archetype);
@@ -117,8 +115,6 @@ public void testArchetypeNotDefined() throws Exception {
117115
}
118116

119117
public void testGenerateArchetypeCompleteWithoutParent() throws Exception {
120-
System.out.println("testGenerateArchetypeCompleteWithoutParent");
121-
122118
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-4", ARCHETYPE_BASIC);
123119

124120
FileUtils.forceDelete(projectDirectory);
@@ -144,8 +140,6 @@ public void testGenerateArchetypeCompleteWithoutParent() throws Exception {
144140
}
145141

146142
public void testGenerateArchetypeCompleteWithParent() throws Exception {
147-
System.out.println("testGenerateArchetypeCompleteWithParent");
148-
149143
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-5", ARCHETYPE_BASIC);
150144

151145
File projectFile = getProjectFile();
@@ -169,8 +163,6 @@ public void testGenerateArchetypeCompleteWithParent() throws Exception {
169163
}
170164

171165
public void testGenerateArchetypePartialOnChild() throws Exception {
172-
System.out.println("testGenerateArchetypePartialOnChild");
173-
174166
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-8", ARCHETYPE_PARTIAL);
175167

176168
File parentProjectFile = getProjectFile();
@@ -197,8 +189,6 @@ public void testGenerateArchetypePartialOnChild() throws Exception {
197189
}
198190

199191
public void testGenerateArchetypePartialOnChildDontOverride() throws Exception {
200-
System.out.println("testGenerateArchetypePartialOnChildDontOverride");
201-
202192
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-9", ARCHETYPE_PARTIAL);
203193

204194
File projectFile = new File(projectDirectory, "pom.xml");
@@ -224,8 +214,6 @@ public void testGenerateArchetypePartialOnChildDontOverride() throws Exception {
224214
}
225215

226216
public void testGenerateArchetypePartialOnParent() throws Exception {
227-
System.out.println("testGenerateArchetypePartialOnParent");
228-
229217
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-7", ARCHETYPE_PARTIAL);
230218

231219
File projectFile = new File(outputDirectory, "pom.xml");
@@ -246,8 +234,6 @@ public void testGenerateArchetypePartialOnParent() throws Exception {
246234
}
247235

248236
public void testGenerateArchetypePartialWithoutPoms() throws Exception {
249-
System.out.println("testGenerateArchetypePartialWithoutPoms");
250-
251237
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-6", ARCHETYPE_PARTIAL);
252238

253239
File projectFile = new File(projectDirectory, "pom.xml");
@@ -264,8 +250,6 @@ public void testGenerateArchetypePartialWithoutPoms() throws Exception {
264250
}
265251

266252
public void testGenerateArchetypeSite() throws Exception {
267-
System.out.println("testGenerateArchetypeSite");
268-
269253
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-10", ARCHETYPE_SITE);
270254

271255
File projectFile = new File(projectDirectory, "pom.xml");
@@ -285,8 +269,6 @@ public void testGenerateArchetypeSite() throws Exception {
285269
}
286270

287271
public void testGenerateFileSetArchetype() throws Exception {
288-
System.out.println("testGenerateFileSetArchetype");
289-
290272
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-12", ARCHETYPE_FILESET);
291273

292274
File projectFile = new File(projectDirectory, "pom.xml");
@@ -369,8 +351,6 @@ public void testGenerateFileSetArchetype() throws Exception {
369351
}
370352

371353
public void testGenerateOldArchetype() throws Exception {
372-
System.out.println("testGenerateOldArchetype");
373-
374354
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-11", ARCHETYPE_OLD);
375355

376356
File projectFile = new File(projectDirectory, "pom.xml");
@@ -391,8 +371,6 @@ public void testGenerateOldArchetype() throws Exception {
391371
}
392372

393373
public void testPropertiesNotDefined() throws Exception {
394-
System.out.println("testPropertiesNotDefined");
395-
396374
ArchetypeGenerationRequest request = createArchetypeGenerationRequest("generate-3", ARCHETYPE_BASIC);
397375

398376
request.setProperties(new Properties());
@@ -406,8 +384,6 @@ public void testPropertiesNotDefined() throws Exception {
406384
}
407385

408386
public void testGenerateArchetypeWithPostScriptIncluded() throws Exception {
409-
System.out.println("testGenerateArchetypeWithPostScriptIncluded");
410-
411387
ArchetypeGenerationRequest request =
412388
createArchetypeGenerationRequest("generate-13", ARCHETYPE_FILESET_WITH_POSTCREATE_SCRIPT);
413389

archetype-common/src/test/java/org/apache/maven/archetype/repositorycrawler/DefaultRepositoryCrawlerTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public class DefaultRepositoryCrawlerTest extends AbstractMojoTestCase {
3131
* Test of crawl method, of class DefaultRepositoryCrawler.
3232
*/
3333
public void testCrawl() throws Exception {
34-
System.out.println("crawl");
35-
3634
File repository = getTestFile("target/test-classes/repositories/central");
3735
RepositoryCrawler instance = (RepositoryCrawler) lookup(RepositoryCrawler.class.getName());
3836

@@ -45,22 +43,4 @@ public void testCrawl() throws Exception {
4543
// TODO: should write to another directory
4644
// instance.writeCatalog(result, new File(repository, "archetype-catalog.xml"));
4745
}
48-
49-
// public void testCrawl2 ()
50-
// throws Exception
51-
// {
52-
// System.out.println ( "\n\n\n\n\n\ncrawl2" );
53-
//
54-
// File repository = new File("/home/rafale/.m2/repository");
55-
// //getTestFile ( "target/test-classes/repositories/central" );
56-
// RepositoryCrawler instance =
57-
// (RepositoryCrawler) lookup ( RepositoryCrawler.class.getName () );
58-
//
59-
// ArchetypeCatalog expResult = null;
60-
// ArchetypeCatalog result = instance.crawl ( repository );
61-
// System.err.println("result = "+result);
62-
// assertEquals ( expResult, result );
63-
// // TODO review the generated test code and remove the default call to fail.
64-
//// fail ( "The test case is a prototype." );
65-
// }
6646
}

archetype-common/src/test/java/org/apache/maven/archetype/test/ArchetypeGenerationTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,12 @@ public void testProjectGenerationFromAnArchetype() throws Exception {
5353

5454
ArchetypeCatalog catalog = archetype.getLocalCatalog(repositorySession);
5555

56-
System.err.println("archetypes => " + catalog.getArchetypes());
5756
// Here I am just grabbing a OldArchetype but in a UI you would take the OldArchetype objects and present
5857
// them to the user.
5958

6059
Archetype selection =
6160
catalog.getArchetypes().get(catalog.getArchetypes().size() - 1);
6261

63-
System.err.println("Selected OldArchetype = " + selection);
6462
// Now you will present a dialog, or whatever, and grab the following values.
6563

6664
String groupId = "com.mycompany";

0 commit comments

Comments
 (0)