Package org.apache.maven.plugins.javadoc
Class JavadocReport
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.javadoc.AbstractJavadocMojo
-
- org.apache.maven.plugins.javadoc.JavadocReport
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,org.apache.maven.reporting.MavenReport
- Direct Known Subclasses:
AggregatorJavadocReport
,JavadocNoForkReport
,TestJavadocReport
@Mojo(name="javadoc", requiresDependencyResolution=COMPILE, threadSafe=true) @Execute(phase=GENERATE_SOURCES) public class JavadocReport extends AbstractJavadocMojo implements org.apache.maven.reporting.MavenReport
Generates documentation for theJava code
in an NON aggregator project using the standard Javadoc Tool.- Since:
- 2.0
- See Also:
- Javadoc Tool, Javadoc Options
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
description
The description of the Javadoc report to be displayed in the Maven Generated Reports page (i.e.private java.lang.String
destDir
The name of the destination directory.private java.lang.String
name
The name of the Javadoc report to be displayed in the Maven Generated Reports page (i.e.private java.io.File
reportOutputDirectory
Specifies the destination directory where javadoc saves the generated HTML files.-
Fields inherited from class org.apache.maven.plugins.javadoc.AbstractJavadocMojo
ARGFILE_FILE_NAME, DEBUG_JAVADOC_SCRIPT_NAME, failOnError, failOnWarnings, FILES_FILE_NAME, JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, links, locationManager, OPTIONS_FILE_NAME, outputDirectory, PACKAGES_FILE_NAME, project, session, skip, TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, useStandardDocletOptions
-
-
Constructor Summary
Constructors Constructor Description JavadocReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canGenerateReport()
The logic is the following: isAggregator hasSourceFiles isRootProject Generate Report True True True True True True False False True False True False True False False False False True True True False True False True False False True False False False False Falsevoid
doExecute()
void
generate(org.codehaus.doxia.sink.Sink sink, java.util.Locale locale)
private java.util.ResourceBundle
getBundle(java.util.Locale locale)
Gets the resource bundle for the specified locale.java.lang.String
getCategoryName()
java.lang.String
getDescription(java.util.Locale locale)
java.lang.String
getName(java.util.Locale locale)
java.lang.String
getOutputName()
java.io.File
getReportOutputDirectory()
boolean
isExternalReport()
void
setDestDir(java.lang.String theDestDir)
void
setReportOutputDirectory(java.io.File reportOutputDirectory)
Method to set the directory where the generated reports will be putprivate void
updateReportOutputDirectory(java.io.File reportOutputDirectory, java.lang.String destDir)
-
Methods inherited from class org.apache.maven.plugins.javadoc.AbstractJavadocMojo
buildJavadocOptions, canGenerateReport, collect, configureDependencySourceResolution, execute, executeReport, failOnError, getArtifactFile, getAttachmentClassifier, getDefaultJavadocApiLink, getDependencyScopeFilter, getDependencySourcePaths, getDoclint, getDoctitle, getExecutionProjectSourceRoots, getFiles, getJavadocDirectory, getJavadocOptionsFile, getOutputDirectory, getOverview, getProject, getProjectBuildOutputDirs, getProjectSourceRoots, getSourcePaths, getToolchain, getWindowtitle, isAggregator, isSkippedJavadoc, isSkippedModule, isTest, isValidJavadocLink, logError, resolveDependency, verifyRemovedParameter
-
-
-
-
Field Detail
-
reportOutputDirectory
@Parameter(property="reportOutputDirectory", defaultValue="${project.reporting.outputDirectory}/apidocs", required=true) private java.io.File reportOutputDirectory
Specifies the destination directory where javadoc saves the generated HTML files.
-
destDir
@Parameter(property="destDir", defaultValue="apidocs") private java.lang.String destDir
The name of the destination directory.- Since:
- 2.1
-
name
@Parameter(property="name") private java.lang.String name
The name of the Javadoc report to be displayed in the Maven Generated Reports page (i.e.project-reports.html
).- Since:
- 2.1
-
description
@Parameter(property="description") private java.lang.String description
The description of the Javadoc report to be displayed in the Maven Generated Reports page (i.e.project-reports.html
).- Since:
- 2.1
-
-
Method Detail
-
getName
public java.lang.String getName(java.util.Locale locale)
- Specified by:
getName
in interfaceorg.apache.maven.reporting.MavenReport
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
- Specified by:
getDescription
in interfaceorg.apache.maven.reporting.MavenReport
-
generate
public void generate(org.codehaus.doxia.sink.Sink sink, java.util.Locale locale) throws org.apache.maven.reporting.MavenReportException
- Specified by:
generate
in interfaceorg.apache.maven.reporting.MavenReport
- Throws:
org.apache.maven.reporting.MavenReportException
-
getOutputName
public java.lang.String getOutputName()
- Specified by:
getOutputName
in interfaceorg.apache.maven.reporting.MavenReport
-
isExternalReport
public boolean isExternalReport()
- Specified by:
isExternalReport
in interfaceorg.apache.maven.reporting.MavenReport
-
canGenerateReport
public boolean canGenerateReport()
The logic is the following:isAggregator hasSourceFiles isRootProject Generate Report True True True True True True False False True False True False True False False False False True True True False True False True False False True False False False False False - Specified by:
canGenerateReport
in interfaceorg.apache.maven.reporting.MavenReport
-
getCategoryName
public java.lang.String getCategoryName()
- Specified by:
getCategoryName
in interfaceorg.apache.maven.reporting.MavenReport
-
getReportOutputDirectory
public java.io.File getReportOutputDirectory()
- Specified by:
getReportOutputDirectory
in interfaceorg.apache.maven.reporting.MavenReport
-
setReportOutputDirectory
public void setReportOutputDirectory(java.io.File reportOutputDirectory)
Method to set the directory where the generated reports will be put- Specified by:
setReportOutputDirectory
in interfaceorg.apache.maven.reporting.MavenReport
- Parameters:
reportOutputDirectory
- the directory file to be set
-
setDestDir
public void setDestDir(java.lang.String theDestDir)
- Parameters:
theDestDir
- The destination directory.
-
updateReportOutputDirectory
private void updateReportOutputDirectory(java.io.File reportOutputDirectory, java.lang.String destDir)
-
doExecute
public void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Specified by:
doExecute
in classAbstractJavadocMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getBundle
private java.util.ResourceBundle getBundle(java.util.Locale locale)
Gets the resource bundle for the specified locale.- Parameters:
locale
- The locale of the currently generated report.- Returns:
- The resource bundle for the requested locale.
-
-