3030import java .util .Collections ;
3131
3232import org .apache .maven .plugin .MojoExecutionException ;
33+ import org .apache .maven .plugin .logging .SystemStreamLog ;
3334import org .apache .maven .plugin .testing .AbstractMojoTestCase ;
3435
3536import static org .apache .commons .io .FileUtils .copyDirectory ;
@@ -273,6 +274,7 @@ public void testCleanLockedFileWithNoError() throws Exception {
273274
274275 /**
275276 * Test the followLink option with windows junctions
277+ *
276278 * @throws Exception
277279 */
278280 public void testFollowLinksWithWindowsJunction () throws Exception {
@@ -298,6 +300,7 @@ public void testFollowLinksWithWindowsJunction() throws Exception {
298300
299301 /**
300302 * Test the followLink option with sym link
303+ *
301304 * @throws Exception
302305 */
303306 public void testFollowLinksWithSymLinkOnPosix () throws Exception {
@@ -315,13 +318,9 @@ public void testFollowLinksWithSymLinkOnPosix() throws Exception {
315318 });
316319 }
317320
318- @ FunctionalInterface
319- interface LinkCreator {
320- void createLink (Path link , Path target ) throws Exception ;
321- }
322-
323321 private void testSymlink (LinkCreator linkCreator ) throws Exception {
324- Cleaner cleaner = new Cleaner (null , null , false , null , null );
322+ // We use the SystemStreamLog() as the AbstractMojo class, because from there the Log is always provided
323+ Cleaner cleaner = new Cleaner (null , new SystemStreamLog (), false , null , null );
325324 Path testDir = Paths .get ("target/test-classes/unit/test-dir" ).toAbsolutePath ();
326325 Path dirWithLnk = testDir .resolve ("dir" );
327326 Path orgDir = testDir .resolve ("org-dir" );
@@ -371,4 +370,9 @@ private boolean checkEmpty(String dir) {
371370 File [] files = new File (dir ).listFiles ();
372371 return files == null || files .length == 0 ;
373372 }
373+
374+ @ FunctionalInterface
375+ interface LinkCreator {
376+ void createLink (Path link , Path target ) throws Exception ;
377+ }
374378}
0 commit comments