Commit 9116d4bf authored by Brian Long's avatar Brian Long
Browse files

less warnings for non-empty directories during purge

parent ca8913e5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ package com.inteligr8.maven.ban;

import java.io.File;
import java.io.IOException;
import java.nio.file.DirectoryNotEmptyException;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
@@ -328,6 +329,8 @@ public class PurgeRepoMojo extends AbstractMojo {
        public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
            try {
                Files.delete(dir);
            } catch (DirectoryNotEmptyException dnee) {
                getLog().debug("The folder will not be deleted as it is not empty: " + dir);
            } catch (IOException ie) {
                getLog().debug(ie);
                getLog().warn("The folder failed to delete: " + dir);