added logging

This commit is contained in:
2023-08-21 15:32:31 -04:00
parent 6e2a701c0d
commit 78e34d85e9

View File

@@ -306,9 +306,12 @@ public class PurgeRepoMojo extends AbstractMojo {
String version = matcher.group(2);
String includeName = artifactId + "-" + version;
String excludeName = artifactId + "-" + version + ".pom";
getLog().debug("artifact-version: " + includeName);
if (file.getFileName().toString().startsWith(includeName) &&
!file.getFileName().toString().startsWith(excludeName)) {
try {
getLog().info("Deleting artifact: " + file);
Files.delete(file);
} catch (IOException ie) {
getLog().debug(ie);