Merge branch 'develop' into stable
This commit is contained in:
@@ -16,6 +16,7 @@ package com.inteligr8.maven.ban;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.file.DirectoryNotEmptyException;
|
||||||
import java.nio.file.FileVisitResult;
|
import java.nio.file.FileVisitResult;
|
||||||
import java.nio.file.FileVisitor;
|
import java.nio.file.FileVisitor;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -328,6 +329,8 @@ public class PurgeRepoMojo extends AbstractMojo {
|
|||||||
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
|
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
|
||||||
try {
|
try {
|
||||||
Files.delete(dir);
|
Files.delete(dir);
|
||||||
|
} catch (DirectoryNotEmptyException dnee) {
|
||||||
|
getLog().debug("The folder will not be deleted as it is not empty: " + dir);
|
||||||
} catch (IOException ie) {
|
} catch (IOException ie) {
|
||||||
getLog().debug(ie);
|
getLog().debug(ie);
|
||||||
getLog().warn("The folder failed to delete: " + dir);
|
getLog().warn("The folder failed to delete: " + dir);
|
||||||
|
Reference in New Issue
Block a user