private void hashArtifacts()

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


    private void hashArtifacts() throws MojoExecutionException {
        for (final Artifact artifact : detachedArtifacts) {
            if (!artifact.getFile().getName().toLowerCase(Locale.ROOT).contains("asc")) {
                final String artifactKey = getArtifactKey(artifact);
                try {
                    final String digest;
                    // SHA-512
                    digest = artifactSha512s.getProperty(artifactKey.toString());
                    getLog().info(artifact.getFile().getName() + " sha512: " + digest);
                    try (PrintWriter printWriter = new PrintWriter(
                            getSha512FilePath(workingDirectory, artifact.getFile()))) {
                        printWriter.println(digest);
                    }
                } catch (final IOException e) {
                    throw new MojoExecutionException("Could not sign file: " + artifact.getFile().getName(), e);
                }
            }
        }
    }