Fixed CleanMojoTest.java
diff --git a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
index f82e615..aef5ce9 100644
--- a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
@@ -30,6 +30,7 @@
import java.util.Collections;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.SystemStreamLog;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import static org.apache.commons.io.FileUtils.copyDirectory;
@@ -273,6 +274,7 @@
/**
* Test the followLink option with windows junctions
+ *
* @throws Exception
*/
public void testFollowLinksWithWindowsJunction() throws Exception {
@@ -298,6 +300,7 @@
/**
* Test the followLink option with sym link
+ *
* @throws Exception
*/
public void testFollowLinksWithSymLinkOnPosix() throws Exception {
@@ -315,13 +318,9 @@
});
}
- @FunctionalInterface
- interface LinkCreator {
- void createLink(Path link, Path target) throws Exception;
- }
-
private void testSymlink(LinkCreator linkCreator) throws Exception {
- Cleaner cleaner = new Cleaner(null, null, false, null, null);
+ // We use the SystemStreamLog() as the AbstractMojo class, because from there the Log is always provided
+ Cleaner cleaner = new Cleaner(null, new SystemStreamLog(), false, null, null);
Path testDir = Paths.get("target/test-classes/unit/test-dir").toAbsolutePath();
Path dirWithLnk = testDir.resolve("dir");
Path orgDir = testDir.resolve("org-dir");
@@ -371,4 +370,9 @@
File[] files = new File(dir).listFiles();
return files == null || files.length == 0;
}
+
+ @FunctionalInterface
+ interface LinkCreator {
+ void createLink(Path link, Path target) throws Exception;
+ }
}