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 MavenSession |
mavenSession
The current Maven session.
|
protected List<MavenReport> |
reports
Reports (Maven 2).
|
protected 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<MavenReport>> |
categoriseReports(Collection<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 SiteRenderingContext |
createSiteRenderingContext(Locale locale) |
protected List<MavenReportExecution> |
getReports() |
protected Map<String,DocumentRenderer> |
locateDocuments(SiteRenderingContext context,
List<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,MavenReport> |
locateReports(List<MavenReportExecution> reports,
Map<String,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(DecorationModel decorationModel,
Locale locale,
Map<String,MavenReport> reportsByOutputName) |
getInputEncoding, getMavenVersion, getOutputEncoding, isMaven3OrMore
getLog, getPluginContext, setLog, setPluginContext
@Component protected Renderer siteRenderer
@Parameter(defaultValue="${reports}", required=true, readonly=true) protected List<MavenReport> reports
@Parameter(alias="workingDirectory", defaultValue="${project.build.directory}/generated-site") protected File generatedSiteDirectory
@Parameter(defaultValue="${session}") protected 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.Contextualizable
org.codehaus.plexus.context.ContextException
protected List<MavenReportExecution> getReports() throws MojoExecutionException
MojoExecutionException
protected SiteRenderingContext createSiteRenderingContext(Locale locale) throws MojoExecutionException, IOException, MojoFailureException
protected Map<String,MavenReport> locateReports(List<MavenReportExecution> reports, Map<String,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<MavenReport>> categoriseReports(Collection<MavenReport> reports)
reports
- A Collection of MavenReportsprotected Map<String,DocumentRenderer> locateDocuments(SiteRenderingContext context, List<MavenReportExecution> reports, Locale locale) throws IOException, RendererException
IOException
RendererException
protected void populateReportItems(DecorationModel decorationModel, Locale locale, Map<String,MavenReport> reportsByOutputName)
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.