in core-it-support/core-it-plugins/maven-it-plugin-site/src/main/java/org/apache/maven/plugin/coreit/ListMojo.java [63:94]
public void execute() throws MojoExecutionException, MojoFailureException {
Properties reportProperties = new Properties();
reportProperties.setProperty("reports", "" + reports.size());
for (int i = 0; i < reports.size(); i++) {
Object report = reports.get(i);
getLog().info("[MAVEN-CORE-IT-LOG] Listing report " + report);
reportProperties.setProperty("reports." + i, report.getClass().getName());
}
getLog().info("[MAVEN-CORE-IT-LOG] Creating output file " + reportsFile);
OutputStream out = null;
try {
reportsFile.getParentFile().mkdirs();
out = new FileOutputStream(reportsFile);
reportProperties.store(out, "MAVEN-CORE-IT-LOG");
} catch (IOException e) {
throw new MojoExecutionException("Output file could not be created: " + reportsFile, e);
} finally {
if (out != null) {
try {
out.close();
} catch (IOException e) {
// just ignore
}
}
}
getLog().info("[MAVEN-CORE-IT-LOG] Created output file " + reportsFile);
}