@Mojo(name="test-javadoc", requiresDependencyResolution=TEST, threadSafe=true) @Execute(phase=GENERATE_TEST_SOURCES) public class TestJavadocReport extends JavadocReport
Java Test code
in an NON aggregator project using the standard
Javadoc Tool.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
destDir
The name of the destination directory.
|
private java.io.File |
reportOutputDirectory
Specifies the destination directory where test Javadoc saves the generated HTML files.
|
private java.lang.String |
testDescription
The description of the Test Javadoc report to be displayed in the Maven Generated Reports page
(i.e.
|
private java.lang.String |
testDoctitle
Specifies the Test title to be placed near the top of the overview summary file.
|
private java.io.File |
testJavadocDirectory
Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e.
|
private java.lang.String |
testName
The name of the Test Javadoc report to be displayed in the Maven Generated Reports page
(i.e.
|
private java.io.File |
testOverview
Specifies that Javadoc should retrieve the text for the Test overview documentation from the "source" file
specified by path/filename and place it on the Overview page (overview-summary.html).
|
private java.lang.String |
testWindowtitle
Specifies the Test title to be placed in the HTML title tag.
|
ARGFILE_FILE_NAME, DEBUG_JAVADOC_SCRIPT_NAME, DEFAULT_JAVA_API_LINKS, failOnError, failOnWarnings, FILES_FILE_NAME, JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, links, OPTIONS_FILE_NAME, outputDirectory, PACKAGES_FILE_NAME, project, session, skip, TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, useStandardDocletOptions
Constructor and Description |
---|
TestJavadocReport() |
Modifier and Type | Method and Description |
---|---|
private void |
addMainJavadocLink()
Add the
../apidocs to the links parameter so Test report could be linked to the Main report. |
protected SourceResolverConfig |
configureDependencySourceResolution(SourceResolverConfig config)
Overridden to enable the resolution of -test-sources jar files.
|
protected void |
executeReport(java.util.Locale unusedLocale)
The package documentation details the
Javadoc Options used by this Plugin.
|
private java.util.ResourceBundle |
getBundle(java.util.Locale locale)
Gets the resource bundle for the specified locale.
|
protected org.apache.maven.shared.artifact.filter.resolve.ScopeFilter |
getDependencyScopeFilter() |
java.lang.String |
getDescription(java.util.Locale locale) |
protected java.lang.String |
getDoctitle() |
protected java.util.List<java.lang.String> |
getExecutionProjectSourceRoots(org.apache.maven.project.MavenProject p) |
protected java.io.File |
getJavadocDirectory() |
java.lang.String |
getName(java.util.Locale locale) |
java.lang.String |
getOutputName() |
protected java.io.File |
getOverview() |
protected java.util.List<java.io.File> |
getProjectBuildOutputDirs(org.apache.maven.project.MavenProject p) |
protected java.util.List<java.lang.String> |
getProjectSourceRoots(org.apache.maven.project.MavenProject p) |
java.io.File |
getReportOutputDirectory() |
protected java.lang.String |
getWindowtitle() |
protected boolean |
isTest()
Indicates whether this goal generates documentation for the
Java Test code . |
void |
setDestDir(java.lang.String destDir) |
void |
setReportOutputDirectory(java.io.File reportOutputDirectory)
Method to set the directory where the generated reports will be put
|
private void |
updateReportOutputDirectory(java.io.File reportOutputDirectory,
java.lang.String destDir) |
canGenerateReport, doExecute, generate, getCategoryName, isExternalReport
buildJavadocOptions, canGenerateReport, collect, execute, failOnError, getAttachmentClassifier, getDependencySourcePaths, getDoclint, getFiles, getJavadocOptionsFile, getOutputDirectory, getProject, getSourcePaths, getToolchain, isAggregator, isValidJavadocLink, logError, resolveDependency, verifyRemovedParameter
@Parameter(property="testDoctitle", alias="doctitle", defaultValue="${project.name} ${project.version} Test API") private java.lang.String testDoctitle
@Parameter(property="testOverview", alias="overview", defaultValue="${basedir}/src/test/javadoc/overview.html") private java.io.File testOverview
@Parameter(property="testWindowtitle", alias="windowtitle", defaultValue="${project.name} ${project.version} Test API") private java.lang.String testWindowtitle
@Parameter(property="reportTestOutputDirectory", defaultValue="${project.reporting.outputDirectory}/testapidocs", required=true) private java.io.File reportOutputDirectory
@Parameter(property="destDir", defaultValue="testapidocs") private java.lang.String destDir
@Parameter(alias="javadocDirectory", defaultValue="${basedir}/src/test/javadoc") private java.io.File testJavadocDirectory
docfilessubdirs
parameter.
@Parameter(property="testName", alias="name") private java.lang.String testName
project-reports.html
).@Parameter(property="testDescription", alias="description") private java.lang.String testDescription
project-reports.html
).protected void executeReport(java.util.Locale unusedLocale) throws org.apache.maven.reporting.MavenReportException
AbstractJavadocMojo
executeReport
in class AbstractJavadocMojo
unusedLocale
- the wanted locale (actually unused).org.apache.maven.reporting.MavenReportException
- if anypublic java.lang.String getName(java.util.Locale locale)
JavadocReport
getName
in interface org.apache.maven.reporting.MavenReport
getName
in class JavadocReport
public java.lang.String getDescription(java.util.Locale locale)
JavadocReport
getDescription
in interface org.apache.maven.reporting.MavenReport
getDescription
in class JavadocReport
public java.lang.String getOutputName()
JavadocReport
getOutputName
in interface org.apache.maven.reporting.MavenReport
getOutputName
in class JavadocReport
public java.io.File getReportOutputDirectory()
JavadocReport
getReportOutputDirectory
in interface org.apache.maven.reporting.MavenReport
getReportOutputDirectory
in class JavadocReport
public void setReportOutputDirectory(java.io.File reportOutputDirectory)
setReportOutputDirectory
in interface org.apache.maven.reporting.MavenReport
setReportOutputDirectory
in class JavadocReport
reportOutputDirectory
- the directory file to be setpublic void setDestDir(java.lang.String destDir)
setDestDir
in class JavadocReport
destDir
- The destiation directory.private void updateReportOutputDirectory(java.io.File reportOutputDirectory, java.lang.String destDir)
protected java.util.List<java.io.File> getProjectBuildOutputDirs(org.apache.maven.project.MavenProject p)
getProjectBuildOutputDirs
in class AbstractJavadocMojo
p
- not null maven projectprotected java.util.List<java.lang.String> getProjectSourceRoots(org.apache.maven.project.MavenProject p)
getProjectSourceRoots
in class AbstractJavadocMojo
p
- not null maven projectprotected java.util.List<java.lang.String> getExecutionProjectSourceRoots(org.apache.maven.project.MavenProject p)
getExecutionProjectSourceRoots
in class AbstractJavadocMojo
p
- not null maven projectprotected java.io.File getJavadocDirectory()
getJavadocDirectory
in class AbstractJavadocMojo
protected java.lang.String getDoctitle()
getDoctitle
in class AbstractJavadocMojo
protected java.io.File getOverview()
getOverview
in class AbstractJavadocMojo
javadocdirectory
protected java.lang.String getWindowtitle()
getWindowtitle
in class AbstractJavadocMojo
protected org.apache.maven.shared.artifact.filter.resolve.ScopeFilter getDependencyScopeFilter()
getDependencyScopeFilter
in class AbstractJavadocMojo
private java.util.ResourceBundle getBundle(java.util.Locale locale)
locale
- The locale of the currently generated report.private void addMainJavadocLink()
../apidocs
to the links parameter so Test report could be linked to the Main report.protected SourceResolverConfig configureDependencySourceResolution(SourceResolverConfig config)
configureDependencySourceResolution
in class AbstractJavadocMojo
config
- SourceResolverConfig
SourceResolverConfig
protected boolean isTest()
AbstractJavadocMojo
Java Test code
.isTest
in class AbstractJavadocMojo
true
if the goal generates Test Javadocs, false
otherwise.