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/26 16:27:16 UTC
(maven-shade-plugin) branch master updated: Improve log messages
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 7388b574 Improve log messages
7388b574 is described below
commit 7388b574d8a222499fd07b8b6060691c4ceebabd
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..fbe6fe15 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() + " in jar " + jar.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..76042cf3 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));