org.apache.maven.plugin.javadoc
Class AbstractJavadocMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.javadoc.AbstractJavadocMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
JavadocJar, JavadocReport

public abstract class AbstractJavadocMojo
extends org.apache.maven.plugin.AbstractMojo

Base class with majority of Javadoc functionality.

Author:
Brett Porter, Vincent Siveton

Field Summary
protected  boolean aggregate
          Whether to build an aggregated report at the root, or build individual reports.
protected  java.io.File outputDirectory
          Specifies the destination directory where javadoc saves the generated HTML files.
protected  org.apache.maven.project.MavenProject project
          The Maven Project Object
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJavadocMojo()
           
 
Method Summary
protected  boolean canGenerateReport(java.util.List files)
          Method that indicates whether the javadoc can be generated or not.
protected  void executeReport(java.util.Locale locale)
           
protected  java.util.List getFiles(java.util.List sourcePaths)
          Method to get the files on the specified source paths
protected  java.lang.String getOutputDirectory()
           
protected  java.util.List getSourcePaths()
          Method to get the source paths.
 
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

project

protected org.apache.maven.project.MavenProject project
The Maven Project Object


aggregate

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


outputDirectory

protected java.io.File outputDirectory
Specifies the destination directory where javadoc saves the generated HTML files.
See d.

Constructor Detail

AbstractJavadocMojo

public AbstractJavadocMojo()
Method Detail

getOutputDirectory

protected java.lang.String getOutputDirectory()
Returns:
the output directory

executeReport

protected void executeReport(java.util.Locale locale)
                      throws org.apache.maven.reporting.MavenReportException
Parameters:
locale -
Throws:
org.apache.maven.reporting.MavenReportException

getFiles

protected java.util.List getFiles(java.util.List sourcePaths)
Method to get the files on the specified source paths

Parameters:
sourcePaths - a List that contains the paths to the source files
Returns:
a List that contains the specific path for every source file

getSourcePaths

protected java.util.List getSourcePaths()
Method to get the source paths. If no source path is specified in the parameter, the compile source roots of the project will be used.

Returns:
a List of the project source paths

canGenerateReport

protected boolean canGenerateReport(java.util.List files)
Method that indicates whether the javadoc can be generated or not. If the project does not contain any source files and no subpackages are specified, the plugin will terminate.

Parameters:
files - the project files
Returns:
a boolean that indicates whether javadoc report can be generated or not


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