org.apache.maven.plugins.site
Class AbstractSiteRenderingMojo

java.lang.Object
  extended byorg.apache.maven.plugin.AbstractMojo
      extended byorg.apache.maven.plugins.site.AbstractSiteMojo
          extended byorg.apache.maven.plugins.site.AbstractSiteRenderingMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
SiteMojo, SiteRunMojo

public abstract class AbstractSiteRenderingMojo
extends AbstractSiteMojo

Base class for site rendering mojos.

Version:
$Id: AbstractSiteRenderingMojo.html 816550 2012-05-08 11:52:49Z hboutemy $
Author:
Brett Porter

Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
          The component used for creating artifact instances.
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
          The component that is used to resolve additional artifacts required.
protected  org.apache.maven.doxia.site.decoration.inheritance.DecorationModelInheritanceAssembler assembler
          The component for assembling inheritance.
protected  java.util.Map attributes
          The template properties for rendering the site.
protected  java.io.File generatedSiteDirectory
          Directory containing generated documentation.
protected  java.util.Map moduleExcludes
          Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in '-m1.fml' recursively)

The configuration looks like this: <moduleExcludes> <moduleType>filename1.ext,**/*sample.ext</moduleType> <!

protected  java.util.List reports
           
protected  java.util.List repositories
          Remote repositories used for the project.
protected  org.apache.maven.doxia.siterenderer.Renderer siteRenderer
          Site renderer.
 
Fields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, locales, localRepository, project, reactorProjects, siteDirectory, siteTool
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractSiteRenderingMojo()
           
 
Method Summary
protected  java.util.Map categoriseReports(java.util.Collection reports)
          Go through the collection of reports and put each report into a list for the appropriate category.
protected  org.apache.maven.doxia.siterenderer.SiteRenderingContext createSiteRenderingContext(java.util.Locale locale)
           
protected  java.util.List filterReports(java.util.List reports)
           
protected  java.util.Map locateDocuments(org.apache.maven.doxia.siterenderer.SiteRenderingContext context, java.util.List reports, java.util.Locale locale)
           
protected  java.util.Map locateReports(java.util.List reports, java.util.Map documents, java.util.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
 
Methods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getInputEncoding, getOutputEncoding, populateReportItems, toRelative
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

moduleExcludes

protected java.util.Map moduleExcludes
Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in '-m1.fml' recursively)

The configuration looks like this:

   <moduleExcludes>
     <moduleType>filename1.ext,**/*sample.ext</moduleType>
     <!-- moduleType can be one of 'apt', 'fml' or 'xdoc'. -->
     <!-- The value is a comma separated list of           -->
     <!-- filenames or fileset patterns.                   -->
     <!-- Here's an example:                               -->
     <xdoc>changes.xml,navigation.xml</xdoc>
   </moduleExcludes>
 

Is defined by:

assembler

protected org.apache.maven.doxia.site.decoration.inheritance.DecorationModelInheritanceAssembler assembler
The component for assembling inheritance.

Is a Plexus component defined by:

artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
The component that is used to resolve additional artifacts required.

Is a Plexus component defined by:

repositories

protected java.util.List repositories
Remote repositories used for the project.

Is defined by:
expression:
${project.remoteArtifactRepositories}

artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
The component used for creating artifact instances.

Is a Plexus component defined by:

attributes

protected java.util.Map attributes
The template properties for rendering the site.

Is defined by:
expression:
${attributes}

siteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
Site renderer.

Is a Plexus component defined by:

reports

protected java.util.List reports
Is defined by:
expression:
${reports}
Is readonly.
Is required.

generatedSiteDirectory

protected java.io.File generatedSiteDirectory
Directory containing generated documentation.

Is defined by:
expression:
${project.build.directory}/generated-site
alias:
workingDirectory
Is required.
Constructor Detail

AbstractSiteRenderingMojo

public AbstractSiteRenderingMojo()
Method Detail

filterReports

protected java.util.List filterReports(java.util.List reports)

createSiteRenderingContext

protected org.apache.maven.doxia.siterenderer.SiteRenderingContext createSiteRenderingContext(java.util.Locale locale)
                                                                                       throws org.apache.maven.plugin.MojoExecutionException,
                                                                                              java.io.IOException,
                                                                                              org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
java.io.IOException
org.apache.maven.plugin.MojoFailureException

locateReports

protected java.util.Map locateReports(java.util.List reports,
                                      java.util.Map documents,
                                      java.util.Locale locale)
Go through the list of reports and process each one like this:

Parameters:
reports - A List of MavenReports
documents - A Map of documents, keyed by filename
Returns:
A map with all reports keyed by filename having the report itself as value. The map will be used to populate a menu.

categoriseReports

protected java.util.Map categoriseReports(java.util.Collection reports)
Go through the collection of reports and put each report into a list for the appropriate category. The list is put into a map keyed by the name of the category.

Parameters:
reports - A Collection of MavenReports
Returns:
A map keyed category having the report itself as value

locateDocuments

protected java.util.Map locateDocuments(org.apache.maven.doxia.siterenderer.SiteRenderingContext context,
                                        java.util.List reports,
                                        java.util.Locale locale)
                                 throws java.io.IOException,
                                        org.apache.maven.doxia.siterenderer.RendererException
Throws:
java.io.IOException
org.apache.maven.doxia.siterenderer.RendererException


Copyright © 2002-2009 The Apache Software Foundation. All Rights Reserved.