private void putAttachedArtifactInSha512Map()

in src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java [252:272]


    private void putAttachedArtifactInSha512Map(final Artifact artifact) throws MojoExecutionException {
        try {
            final String artifactKey = getArtifactKey(artifact);
            if (!artifactKey.endsWith(".asc")) { // .asc files don't need hashes
                try (InputStream fis = Files.newInputStream(artifact.getFile().toPath())) {
                    artifactSha512s.put(artifactKey, DigestUtils.sha512Hex(fis));
                }
            }
        } catch (final IOException e) {
            throw new MojoExecutionException(
                "Could not find artifact signature for: "
                    + artifact.getArtifactId()
                    + "-"
                    + artifact.getClassifier()
                    + "-"
                    + artifact.getVersion()
                    + " type: "
                    + artifact.getType(),
                e);
        }
    }