NO-JIRA ArtemisDependencyScanPlugin not working with targetDirectory

This commit is contained in:
Clebert Suconic 2023-06-08 13:52:49 -04:00
parent e9b5931227
commit 484934b0f5
1 changed files with 12 additions and 1 deletions

View File

@ -135,10 +135,21 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin {
}
if (getLog().isDebugEnabled()) {
getLog().debug("targetFolder=" + targetFolder);
}
if (targetFolder != null) {
if (getLog().isDebugEnabled()) {
getLog().debug("copying libraries into " + targetFolder);
}
targetFolder.mkdirs();
for (File file : filesSet) {
Files.copy(file.toPath(), targetFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);
File targetFile = new File(targetFolder, file.getName());
if (getLog().isDebugEnabled()) {
getLog().debug("copying " + file.toPath() + " into " + targetFile.toPath());
}
Files.copy(file.toPath(), targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
}
} catch (Throwable e) {