in core-it-support/core-it-plugins/maven-it-plugin-touch/src/main/java/org/apache/maven/plugin/coreit/CopyPomMojo.java [48:73]
public void execute() throws MojoExecutionException {
try {
File dest = new File(outputFile);
File dir = dest.getParentFile();
if (!dir.exists()) {
dir.mkdirs();
}
getLog().info("Copying POM to file: " + dest.getAbsolutePath());
FileInputStream in = new FileInputStream(pomFile);
FileOutputStream out = new FileOutputStream(dest);
int read = -1;
byte[] buf = new byte[4 * 1024];
while ((read = in.read(buf)) > -1) {
out.write(buf, 0, read);
}
in.close();
out.close();
} catch (IOException e) {
throw new MojoExecutionException("Error copying POM", e);
}
}