in src/main/java/org/apache/maven/reporting/AbstractMavenReport.java [217:245]
private void reportToMarkup() throws MojoExecutionException {
getLog().info("Rendering to " + outputFormat + " markup");
if (!isExternalReport()) {
File outputDirectory = new File(getOutputDirectory());
String filename = getOutputName() + '.' + outputFormat;
try {
sinkFactory = container.lookup(SinkFactory.class, outputFormat);
sink = sinkFactory.createSink(outputDirectory, filename);
} catch (ComponentLookupException cle) {
throw new MojoExecutionException(
"Cannot find SinkFactory for Doxia output format: " + outputFormat, cle);
} catch (IOException ioe) {
throw new MojoExecutionException("Cannot create sink to " + new File(outputDirectory, filename), ioe);
}
}
try {
Locale locale = getLocale();
generate(sink, sinkFactory, locale);
} catch (MavenReportException e) {
throw new MojoExecutionException(
"An error has occurred in " + getName(Locale.ENGLISH) + " report generation.", e);
} finally {
if (sink != null) {
sink.close();
}
}
}