Skip to content

describe-build-output: protect sha256 against unexpected directory - #230

Merged
hboutemy merged 1 commit into
masterfrom
fail-directory
Aug 9, 2026
Merged

describe-build-output: protect sha256 against unexpected directory#230
hboutemy merged 1 commit into
masterfrom
fail-directory

Conversation

@hboutemy

@hboutemy hboutemy commented Aug 9, 2026

Copy link
Copy Markdown
Member

sometimes, unexpectedly, there are directories instead of files in artifact.getFile(), which causes

Caused by: java.io.IOException: Is a directory
    at sun.nio.ch.UnixFileDispatcherImpl.read0(Native Method)
    at sun.nio.ch.UnixFileDispatcherImpl.read(UnixFileDispatcherImpl.java:51)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:341)
    at sun.nio.ch.IOUtil.read(IOUtil.java:307)
    at sun.nio.ch.IOUtil.read(IOUtil.java:284)
    at sun.nio.ch.FileChannelImpl.implRead(FileChannelImpl.java:251)
    at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:231)
    at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:90)
    at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:119)
    at org.apache.commons.codec.digest.DigestUtils.updateDigest(DigestUtils.java:1313)
    at org.apache.commons.codec.digest.DigestUtils.digest(DigestUtils.java:112)
    at org.apache.commons.codec.digest.DigestUtils.sha256(DigestUtils.java:612)
    at org.apache.commons.codec.digest.DigestUtils.sha256Hex(DigestUtils.java:646)
    at org.apache.maven.plugins.artifact.buildinfo.DescribeBuildOutputMojo.sha256(DescribeBuildOutputMojo.java:206)
    at org.apache.maven.plugins.artifact.buildinfo.DescribeBuildOutputMojo.describeArtifact(DescribeBuildOutputMojo.java:186)
    at org.apache.maven.plugins.artifact.buildinfo.DescribeBuildOutputMojo.describeBuildOutput(DescribeBuildOutputMojo.java:155)
    at org.apache.maven.plugins.artifact.buildinfo.DescribeBuildOutputMojo.execute(DescribeBuildOutputMojo.java:77)

seen when rebuilding Shiro 3.0.0 jvm-repo-rebuild/reproducible-central#6604

need to protect first, then we can try to understand what in the build caused that

@hboutemy hboutemy added the bug Something isn't working label Aug 9, 2026
@hboutemy hboutemy changed the title protect sha256 against unexpected directory describe-build-output: protect sha256 against unexpected directory Aug 9, 2026
@hboutemy
hboutemy merged commit 52068e3 into master Aug 9, 2026
20 of 22 checks passed
@hboutemy
hboutemy deleted the fail-directory branch August 9, 2026 11:07
@github-actions github-actions Bot added this to the 3.6.2 milestone Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant