You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2026/08/09 10:59:00 UTC
(maven-artifact-plugin) branch fail-directory created (now d9ca0da)
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a change to branch fail-directory
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git
at d9ca0da protect sha256 against unexpected directory
This branch includes the following new commits:
new d9ca0da protect sha256 against unexpected directory
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-artifact-plugin) 01/01: protect sha256 against unexpected directory
Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch fail-directory
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git
commit d9ca0da1de65bc73b310f9c9abe728c5f27be2e1
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Aug 9 11:58:42 2026 +0100
protect sha256 against unexpected directory
---
.../maven/plugins/artifact/buildinfo/DescribeBuildOutputMojo.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/DescribeBuildOutputMojo.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/DescribeBuildOutputMojo.java
index ba5e526..0b0e6ff 100644
--- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/DescribeBuildOutputMojo.java
+++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/DescribeBuildOutputMojo.java
@@ -218,6 +218,9 @@ public class DescribeBuildOutputMojo extends AbstractBuildinfoMojo {
}
private String sha256(File file) throws MojoExecutionException {
+ if (file.isDirectory()) {
+ return "directory";
+ }
try (InputStream is = Files.newInputStream(file.toPath())) {
return DigestUtils.sha256Hex(is);
} catch (IOException ioe) {