You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2026/05/17 12:36:53 UTC

(maven-dependency-plugin) branch 1618 created (now b2fab9c0)

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

elharo pushed a change to branch 1618
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git


      at b2fab9c0 Debug log unpacking

This branch includes the following new commits:

     new b2fab9c0 Debug log unpacking

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-dependency-plugin) 01/01: Debug log unpacking

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch 1618
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit b2fab9c08048269606b2625e8d16c94fc618232b
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sun May 17 08:36:46 2026 -0400

    Debug log unpacking
---
 .../maven/plugins/dependency/utils/UnpackUtil.java | 50 +++++++++++-----------
 1 file changed, 24 insertions(+), 26 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/dependency/utils/UnpackUtil.java b/src/main/java/org/apache/maven/plugins/dependency/utils/UnpackUtil.java
index 0d6cd716..33da1a46 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/utils/UnpackUtil.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/utils/UnpackUtil.java
@@ -156,32 +156,30 @@ public class UnpackUtil {
     }
 
     private void logUnpack(Log logger, File file, File location, String includes, String excludes) {
-        if (logger.isInfoEnabled()) {
-            return;
-        }
-
-        StringBuilder msg = new StringBuilder();
-        msg.append("Unpacking ");
-        msg.append(file);
-        msg.append(" to ");
-        msg.append(location);
-
-        if (includes != null && excludes != null) {
-            msg.append(" with includes \"");
-            msg.append(includes);
-            msg.append("\" and excludes \"");
-            msg.append(excludes);
-            msg.append("\"");
-        } else if (includes != null) {
-            msg.append(" with includes \"");
-            msg.append(includes);
-            msg.append("\"");
-        } else if (excludes != null) {
-            msg.append(" with excludes \"");
-            msg.append(excludes);
-            msg.append("\"");
+        if (logger.isDebugEnabled()) {
+            StringBuilder msg = new StringBuilder();
+            msg.append("Unpacking ");
+            msg.append(file);
+            msg.append(" to ");
+            msg.append(location);
+    
+            if (includes != null && excludes != null) {
+                msg.append(" with includes \"");
+                msg.append(includes);
+                msg.append("\" and excludes \"");
+                msg.append(excludes);
+                msg.append("\"");
+            } else if (includes != null) {
+                msg.append(" with includes \"");
+                msg.append(includes);
+                msg.append("\"");
+            } else if (excludes != null) {
+                msg.append(" with excludes \"");
+                msg.append(excludes);
+                msg.append("\"");
+            }
+    
+            logger.info(msg.toString());
         }
-
-        logger.info(msg.toString());
     }
 }