public abstract class AbstractSiteRenderingMojo extends AbstractSiteMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
| Modifier and Type | Field and Description |
|---|---|
protected File |
generatedSiteDirectory
Directory containing generated documentation.
|
protected org.apache.maven.execution.MavenSession |
mavenSession
The current Maven session.
|
protected List<org.apache.maven.reporting.MavenReport> |
reports
Reports (Maven 2).
|
protected org.apache.maven.doxia.siterenderer.Renderer |
siteRenderer
Site renderer.
|
i18n, locales, localRepository, project, reactorProjects, siteDirectory, siteTool| Constructor and Description |
|---|
AbstractSiteRenderingMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,List<org.apache.maven.reporting.MavenReport>> |
categoriseReports(Collection<org.apache.maven.reporting.MavenReport> reports)
Go through the collection of reports and put each report into a list for the appropriate category.
|
void |
contextualize(org.codehaus.plexus.context.Context context) |
protected org.apache.maven.doxia.siterenderer.SiteRenderingContext |
createSiteRenderingContext(Locale locale) |
protected List<org.apache.maven.reporting.exec.MavenReportExecution> |
getReports() |
protected Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> |
locateDocuments(org.apache.maven.doxia.siterenderer.SiteRenderingContext context,
List<org.apache.maven.reporting.exec.MavenReportExecution> reports,
Locale locale)
Locate every document to be rendered for given locale:
handwritten content,
reports,
"Project Information" and "Project Reports" category summaries.
|
protected Map<String,org.apache.maven.reporting.MavenReport> |
locateReports(List<org.apache.maven.reporting.exec.MavenReportExecution> reports,
Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> documents,
Locale locale)
Go through the list of reports and process each one like this:
Add the report to a map of reports keyed by filename having the report itself as value
If the report is not yet in the map of documents, add it together with a suitable renderer
|
protected void |
populateReportItems(org.apache.maven.doxia.site.decoration.DecorationModel decorationModel,
Locale locale,
Map<String,org.apache.maven.reporting.MavenReport> reportsByOutputName) |
getInputEncoding, getMavenVersion, getOutputEncoding, isMaven3OrMoregetLog, getPluginContext, setLog, setPluginContext@Component protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
@Parameter(defaultValue="${reports}",
required=true,
readonly=true)
protected List<org.apache.maven.reporting.MavenReport> reports
@Parameter(alias="workingDirectory",
defaultValue="${project.build.directory}/generated-site")
protected File generatedSiteDirectory
@Parameter(defaultValue="${session}")
protected org.apache.maven.execution.MavenSession mavenSession
public void contextualize(org.codehaus.plexus.context.Context context)
throws org.codehaus.plexus.context.ContextException
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizableorg.codehaus.plexus.context.ContextExceptionprotected List<org.apache.maven.reporting.exec.MavenReportExecution> getReports() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected org.apache.maven.doxia.siterenderer.SiteRenderingContext createSiteRenderingContext(Locale locale) throws org.apache.maven.plugin.MojoExecutionException, IOException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionIOExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected Map<String,org.apache.maven.reporting.MavenReport> locateReports(List<org.apache.maven.reporting.exec.MavenReportExecution> reports, Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> documents, Locale locale)
reports - A List of MavenReportsdocuments - A Map of documents, keyed by filenamelocale - the Locale the reports are processed for.protected Map<String,List<org.apache.maven.reporting.MavenReport>> categoriseReports(Collection<org.apache.maven.reporting.MavenReport> reports)
reports - A Collection of MavenReportsprotected Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> locateDocuments(org.apache.maven.doxia.siterenderer.SiteRenderingContext context, List<org.apache.maven.reporting.exec.MavenReportExecution> reports, Locale locale) throws IOException, org.apache.maven.doxia.siterenderer.RendererException
IOExceptionorg.apache.maven.doxia.siterenderer.RendererExceptionCopyright © 2002–2014 The Apache Software Foundation. All rights reserved.