30
30
import java .util .Collections ;
31
31
32
32
import org .apache .maven .plugin .MojoExecutionException ;
33
+ import org .apache .maven .plugin .logging .SystemStreamLog ;
33
34
import org .apache .maven .plugin .testing .AbstractMojoTestCase ;
34
35
35
36
import static org .apache .commons .io .FileUtils .copyDirectory ;
@@ -273,6 +274,7 @@ public void testCleanLockedFileWithNoError() throws Exception {
273
274
274
275
/**
275
276
* Test the followLink option with windows junctions
277
+ *
276
278
* @throws Exception
277
279
*/
278
280
public void testFollowLinksWithWindowsJunction () throws Exception {
@@ -298,6 +300,7 @@ public void testFollowLinksWithWindowsJunction() throws Exception {
298
300
299
301
/**
300
302
* Test the followLink option with sym link
303
+ *
301
304
* @throws Exception
302
305
*/
303
306
public void testFollowLinksWithSymLinkOnPosix () throws Exception {
@@ -315,13 +318,9 @@ public void testFollowLinksWithSymLinkOnPosix() throws Exception {
315
318
});
316
319
}
317
320
318
- @ FunctionalInterface
319
- interface LinkCreator {
320
- void createLink (Path link , Path target ) throws Exception ;
321
- }
322
-
323
321
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 );
325
324
Path testDir = Paths .get ("target/test-classes/unit/test-dir" ).toAbsolutePath ();
326
325
Path dirWithLnk = testDir .resolve ("dir" );
327
326
Path orgDir = testDir .resolve ("org-dir" );
@@ -371,4 +370,9 @@ private boolean checkEmpty(String dir) {
371
370
File [] files = new File (dir ).listFiles ();
372
371
return files == null || files .length == 0 ;
373
372
}
373
+
374
+ @ FunctionalInterface
375
+ interface LinkCreator {
376
+ void createLink (Path link , Path target ) throws Exception ;
377
+ }
374
378
}
0 commit comments