org.apache.maven.plugin.jxr
Class AbstractJxrReport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by org.apache.maven.plugin.jxr.AbstractJxrReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport
Direct Known Subclasses:
JxrReport, JxrTestReport

public abstract class AbstractJxrReport
extends org.apache.maven.reporting.AbstractMavenReport

Base class for the JXR reports.

Version:
$Id: AbstractJxrReport.java 710182 2008-11-03 21:53:34Z hboutemy $
Author:
Fabrice Bellingard, Brett Porter, Vincent Siveton

Field Summary
protected  boolean aggregate
          Whether to build an aggregated report at the root, or build individual reports.
protected  java.util.List reactorProjects
          The projects in the reactor for aggregation report.
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJxrReport()
           
 
Method Summary
 boolean canGenerateReport()
           
protected  boolean canGenerateReport(java.util.List sourceDirs)
           
protected  java.util.List constructSourceDirs()
          Gets the list of the source directories to be included in the JXR report generation
protected  void executeReport(java.util.Locale locale)
           
protected  java.util.ResourceBundle getBundle(java.util.Locale locale)
          Returns the correct resource bundle according to the locale
protected abstract  java.lang.String getDestinationDirectory()
          Abstract method that returns the target directory where the generated JXR reports will be put.
protected abstract  java.io.File getJavadocDir()
          Abstract method that returns the directory of the javadoc files.
protected  java.lang.String getOutputDirectory()
           
protected  java.lang.String getOutputEncoding()
          Gets the effective reporting output files encoding.
 org.apache.maven.project.MavenProject getProject()
           
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
           
protected abstract  java.util.List getSourceRoots()
          Abstract method that returns the specified source directories that will be included in the JXR report generation.
protected abstract  java.util.List getSourceRoots(org.apache.maven.project.MavenProject project)
          Abstract method that returns the compile source directories of the specified project that will be included in the JXR report generation
protected  void init()
          Initialize some attributes required during the report generation
 boolean isExternalReport()
           
protected  java.util.List pruneSourceDirs(java.util.List sourceDirs)
          Compiles the list of directories which contain source files that will be included in the JXR report generation.
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, generate, getCategoryName, getReportOutputDirectory, getSink, setReportOutputDirectory
 
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.reporting.MavenReport
getDescription, getName, getOutputName
 

Field Detail

reactorProjects

protected java.util.List reactorProjects
The projects in the reactor for aggregation report.

Is defined by:
expression:
${reactorProjects}
Is readonly.

aggregate

protected boolean aggregate
Whether to build an aggregated report at the root, or build individual reports.

Is defined by:
expression:
${aggregate}
default-value:
false
Constructor Detail

AbstractJxrReport

public AbstractJxrReport()
Method Detail

getOutputEncoding

protected java.lang.String getOutputEncoding()
Gets the effective reporting output files encoding.

Returns:
The effective reporting output file encoding, never null: defaults to UTF-8 instead.

pruneSourceDirs

protected java.util.List pruneSourceDirs(java.util.List sourceDirs)
Compiles the list of directories which contain source files that will be included in the JXR report generation.

Parameters:
sourceDirs - the List of the source directories
Returns:
a List of the directories that will be included in the JXR report generation

init

protected void init()
Initialize some attributes required during the report generation


getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getSiteRenderer()

getOutputDirectory

protected java.lang.String getOutputDirectory()
Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getOutputDirectory()

getProject

public org.apache.maven.project.MavenProject getProject()
Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getProject()

getBundle

protected java.util.ResourceBundle getBundle(java.util.Locale locale)
Returns the correct resource bundle according to the locale

Parameters:
locale - the locale of the user
Returns:
the bundle corresponding to the locale

canGenerateReport

protected boolean canGenerateReport(java.util.List sourceDirs)
Parameters:
sourceDirs -
Returns:
true if the report could be generated

executeReport

protected void executeReport(java.util.Locale locale)
                      throws org.apache.maven.reporting.MavenReportException
Specified by:
executeReport in class org.apache.maven.reporting.AbstractMavenReport
Throws:
org.apache.maven.reporting.MavenReportException
See Also:
AbstractMavenReport.executeReport(java.util.Locale)

constructSourceDirs

protected java.util.List constructSourceDirs()
Gets the list of the source directories to be included in the JXR report generation

Returns:
a List of the source directories whose contents will be included in the JXR report generation

canGenerateReport

public boolean canGenerateReport()
Specified by:
canGenerateReport in interface org.apache.maven.reporting.MavenReport
Overrides:
canGenerateReport in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.canGenerateReport()

isExternalReport

public boolean isExternalReport()
Specified by:
isExternalReport in interface org.apache.maven.reporting.MavenReport
Overrides:
isExternalReport in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.isExternalReport()

getDestinationDirectory

protected abstract java.lang.String getDestinationDirectory()
Abstract method that returns the target directory where the generated JXR reports will be put.

Returns:
a String that contains the target directory name

getSourceRoots

protected abstract java.util.List getSourceRoots()
Abstract method that returns the specified source directories that will be included in the JXR report generation.

Returns:
a List of the source directories

getSourceRoots

protected abstract java.util.List getSourceRoots(org.apache.maven.project.MavenProject project)
Abstract method that returns the compile source directories of the specified project that will be included in the JXR report generation

Parameters:
project - the MavenProject where the JXR report plugin will be executed
Returns:
a List of the source directories

getJavadocDir

protected abstract java.io.File getJavadocDir()
Abstract method that returns the directory of the javadoc files.

Returns:
a File for the directory of the javadocs


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.