You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2026/09/20 10:08:23 UTC

(maven-shade-plugin) branch kriegaex-improvements created (now 17bdef0f)

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

asf-gitbox-commits pushed a change to branch kriegaex-improvements
in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git


      at 17bdef0f Improve log messages

This branch includes the following new commits:

     new 17bdef0f Improve log messages

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-shade-plugin) 01/01: Improve log messages

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

asf-gitbox-commits pushed a commit to branch kriegaex-improvements
in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git

commit 17bdef0f85e4d5752a3a60d74a770f3e61eaaef4
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Sep 20 12:07:08 2026 +0200

    Improve log messages
---
 .../org/apache/maven/plugins/shade/filter/MinijarFilter.java     | 9 ++++-----
 src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java | 3 +--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java b/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java
index 42fc94ca..0c9abd23 100644
--- a/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java
+++ b/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java
@@ -191,12 +191,11 @@ public class MinijarFilter implements Filter {
                 continue;
             }
 
-            try (BufferedReader configFileReader =
-                    new BufferedReader(new InputStreamReader(new FileInputStream(serviceProviderConfigFile), UTF_8))) {
+            try (BufferedReader configFileReader = Files.newBufferedReader(serviceProviderConfigFile.toPath(), UTF_8)) {
                 // check whether the found classes use services in turn
                 repeatScan |= scanServiceProviderConfigFile(cp, configFileReader);
             } catch (final IOException e) {
-                log.warn(e.getMessage());
+                log.warn("Failed to scan service provider config file " + serviceProviderConfigFile, e);
             }
         }
         return repeatScan;
@@ -222,11 +221,11 @@ public class MinijarFilter implements Filter {
                     // check whether the found classes use services in turn
                     repeatScan = scanServiceProviderConfigFile(cp, configFileReader);
                 } catch (final IOException e) {
-                    log.warn(e.getMessage());
+                    log.warn("Failed to scan JAR entry " + jarEntry.getName(), e);
                 }
             }
         } catch (final IOException e) {
-            log.warn("Not a JAR file candidate. Ignoring classpath element '" + fileName + "' (" + e + ").");
+            log.warn("Not a JAR file candidate. Ignoring classpath element '" + fileName + "'", e);
         }
         return repeatScan;
     }
diff --git a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
index 01b774da..3f2fdedf 100644
--- a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
@@ -1044,8 +1044,7 @@ public class ShadeMojo extends AbstractMojo {
             if (entryPoints == null) {
                 entryPoints = new HashSet<>();
             }
-            getLog().info("Minimizing jar " + project.getArtifact()
-                    + (entryPoints.isEmpty() ? "" : " with entry points"));
+            getLog().info( "Minimizing jar " + project.getArtifact() );
 
             try {
                 filters.add(new MinijarFilter(project, getLog(), simpleFilters, entryPoints));