in apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java [173:208]
private SiteRenderingContext createSiteRenderingContext(Locale locale)
throws MavenReportException, IOException {
DecorationModel decorationModel = new DecorationModel();
Map<String, Object> templateProperties = new HashMap<>();
// We tell the skin that we are rendering in standalone mode
templateProperties.put("standalone", Boolean.TRUE);
templateProperties.put("project", getProject());
templateProperties.put("inputEncoding", getInputEncoding());
templateProperties.put("outputEncoding", getOutputEncoding());
// Put any of the properties in directly into the Velocity context
for (Map.Entry<Object, Object> entry : getProject().getProperties().entrySet()) {
templateProperties.put((String) entry.getKey(), entry.getValue());
}
SiteRenderingContext context;
try {
Artifact skinArtifact =
siteTool.getSkinArtifactFromRepository(session.getLocalRepository(), remoteRepositories, decorationModel);
getLog().debug(buffer().a("Rendering content with ").strong(skinArtifact.getId()
+ " skin").a('.').toString());
context = siteRenderer.createContextForSkin(skinArtifact, templateProperties, decorationModel,
project.getName(), locale);
} catch (SiteToolException e) {
throw new MavenReportException("Failed to retrieve skin artifact", e);
} catch (RendererException e) {
throw new MavenReportException("Failed to create context for skin", e);
}
// Generate static site
context.setRootDirectory(project.getBasedir());
return context;
}