diff --git a/src/it/projects/mdep-839-list/verify.groovy b/src/it/projects/mdep-839-list/verify.groovy index f20821cec..5f77922d3 100644 --- a/src/it/projects/mdep-839-list/verify.groovy +++ b/src/it/projects/mdep-839-list/verify.groovy @@ -22,4 +22,7 @@ assert file.exists() : "output file $file does not exist" String output = file.getText( "UTF-8" ) assert output.contains( 'The following files have been resolved:') +for (char c : output) { // no color codes + assert c >= 32 || c == '\n' || c == '\r' || c == '\t'; +} diff --git a/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java b/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java index bca7279de..5ec05ccd6 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java +++ b/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java @@ -26,7 +26,6 @@ import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.OpenOption; -import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.util.Objects; @@ -230,8 +229,7 @@ public static synchronized void write(String string, File file, boolean append, */ public static synchronized void write(String string, File file, boolean append, String encoding) throws IOException { - Path parent = Files.createDirectories(file.getParentFile().toPath()); - System.err.println(parent.toAbsolutePath()); + Files.createDirectories(file.getParentFile().toPath()); OpenOption appendOption = append ? StandardOpenOption.APPEND : StandardOpenOption.TRUNCATE_EXISTING;