in src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java [100:136]
public void execute() throws MojoExecutionException, MojoFailureException {
if (skip) {
getLog().info("maven.site.skip = true: Skipping site generation");
return;
}
if (getLog().isDebugEnabled()) {
getLog().debug("executing Site Mojo");
}
checkInputEncoding();
try {
List<Locale> localesList = getLocales();
for (Locale locale : localesList) {
getLog().info("Rendering site for "
+ buffer().strong(
(!locale.equals(SiteTool.DEFAULT_LOCALE)
? "locale '" + locale + "'"
: "default locale"))
.build());
File outputDirectory = getOutputDirectory(locale);
List<MavenReportExecution> reports =
generateReports ? getReports(outputDirectory) : Collections.emptyList();
renderLocale(locale, reports, localesList, outputDirectory);
}
} catch (RendererException e) {
if (e.getCause() instanceof MavenReportException) {
// issue caused by report, not really by Doxia Site Renderer
throw new MojoExecutionException(e.getMessage(), e.getCause());
}
throw new MojoExecutionException("Failed to render site", e);
} catch (IOException e) {
throw new MojoExecutionException("Error during site generation", e);
}
}