private void printFile()

in src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildInfoWriter.java [281:293]


    private void printFile(String prefix, String groupId, File file, String filename) throws MojoExecutionException {
        p.println();
        p.println(prefix + ".groupId=" + groupId);
        p.println(prefix + ".filename=" + filename);
        p.println(prefix + ".length=" + file.length());
        try (InputStream is = Files.newInputStream(file.toPath())) {
            p.println(prefix + ".checksums.sha512=" + DigestUtils.sha512Hex(is));
        } catch (IOException ioe) {
            throw new MojoExecutionException("Error processing file " + file, ioe);
        } catch (IllegalArgumentException iae) {
            throw new MojoExecutionException("Could not get hash algorithm", iae.getCause());
        }
    }