in src/main/java/org/apache/maven/plugins/artifact/buildinfo/DescribeBuildOutputMojo.java [204:210]
private String sha256(File file) throws MojoExecutionException {
try (InputStream is = Files.newInputStream(file.toPath())) {
return DigestUtils.sha256Hex(is);
} catch (IOException ioe) {
throw new MojoExecutionException("cannot read " + file, ioe);
}
}