in src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java [426:441]
private File generatePomFile() throws MojoExecutionException {
Model model = generateModel();
try {
File tempFile = Files.createTempFile("mvndeploy", ".pom").toFile();
tempFile.deleteOnExit();
try (OutputStream outputStream = Files.newOutputStream(tempFile.toPath())) {
new MavenXpp3Writer().write(outputStream, model);
}
return tempFile;
} catch (IOException e) {
throw new MojoExecutionException("Error writing temporary pom file: " + e.getMessage(), e);
}
}