This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 484934b0f5 NO-JIRA ArtemisDependencyScanPlugin not working with 
targetDirectory
484934b0f5 is described below

commit 484934b0f53f0ef55fe55b1983d6769ba9af1fa9
Author: Clebert Suconic <[email protected]>
AuthorDate: Thu Jun 8 13:52:49 2023 -0400

    NO-JIRA ArtemisDependencyScanPlugin not working with targetDirectory
---
 .../activemq/artemis/maven/ArtemisDependencyScanPlugin.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java
 
b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java
index 00da6055f2..ba75866545 100644
--- 
a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java
+++ 
b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java
@@ -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) {

Reply via email to