Package org.apache.maven.plugins.javadoc
Class TestJavadocJar
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.javadoc.AbstractJavadocMojo
-
- org.apache.maven.plugins.javadoc.JavadocJar
-
- org.apache.maven.plugins.javadoc.TestJavadocJar
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AggregatorTestJavadocJar
@Mojo(name="test-jar", defaultPhase=PACKAGE, requiresDependencyResolution=TEST, threadSafe=true) public class TestJavadocJar extends JavadocJarBundles the Javadoc documentation fortest Java codein an NON aggregator project into a jar using the standard Javadoc Tool.- Since:
- 2.5
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.FileoutputDirectorySpecifies the destination directory where Javadoc saves the generated HTML files.private java.lang.StringtestClassifierprivate java.lang.StringtestDoctitleSpecifies the Test title to be placed near the top of the overview summary file.private java.io.FiletestJavadocDirectorySpecifies the Test Javadoc resources directory to be included in the Javadoc (i.e.private java.io.FiletestOverviewSpecifies 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.StringtestWindowtitleSpecifies the Test title to be placed in the HTML title tag.-
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, PACKAGES_FILE_NAME, project, session, skip, TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, useStandardDocletOptions
-
-
Constructor Summary
Constructors Constructor Description TestJavadocJar()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SourceResolverConfigconfigureDependencySourceResolution(SourceResolverConfig config)Overriden to enable the resolution of -test-sources jar files.protected java.lang.StringgetClassifier()protected org.apache.maven.shared.artifact.filter.resolve.ScopeFiltergetDependencyScopeFilter()protected java.lang.StringgetDoctitle()protected java.util.List<java.lang.String>getExecutionProjectSourceRoots(org.apache.maven.project.MavenProject p)protected java.io.FilegetJavadocDirectory()protected java.lang.StringgetOutputDirectory()protected java.io.FilegetOverview()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)protected java.lang.StringgetWindowtitle()protected booleanisTest()Indicates whether this goal generates documentation for theJava Test code.-
Methods inherited from class org.apache.maven.plugins.javadoc.JavadocJar
doExecute
-
Methods inherited from class org.apache.maven.plugins.javadoc.AbstractJavadocMojo
buildJavadocOptions, canGenerateReport, collect, execute, executeReport, failOnError, getArtifactFile, getAttachmentClassifier, getDefaultJavadocApiLink, getDependencySourcePaths, getDoclint, getFiles, getJavadocOptionsFile, getProject, getSourcePaths, getToolchain, isAggregator, isSkippedJavadoc, isSkippedModule, isValidJavadocLink, logError, resolveDependency, verifyRemovedParameter
-
-
-
-
Field Detail
-
outputDirectory
@Parameter(defaultValue="${project.build.directory}/testapidocs", required=true) private java.io.File outputDirectory
-
testDoctitle
@Parameter(property="testDoctitle", alias="doctitle", defaultValue="${project.name} ${project.version} Test API") private java.lang.String testDoctitle- Since:
- 2.5
-
testOverview
@Parameter(property="testOverview", alias="overview", defaultValue="${basedir}/src/test/javadoc/overview.html") private java.io.File testOverviewSpecifies 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).
See overview.- Since:
- 2.5
-
testWindowtitle
@Parameter(property="testWindowtitle", alias="windowtitle", defaultValue="${project.name} ${project.version} Test API") private java.lang.String testWindowtitle- Since:
- 2.5
-
testJavadocDirectory
@Parameter(alias="javadocDirectory", defaultValue="${basedir}/src/test/javadoc") private java.io.File testJavadocDirectorySpecifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).- Since:
- 2.5
-
testClassifier
@Parameter(property="maven.javadoc.testClassifier", defaultValue="test-javadoc", required=true) private java.lang.String testClassifier- Since:
- 2.10
-
-
Method Detail
-
getClassifier
protected java.lang.String getClassifier()
- Overrides:
getClassifierin classJavadocJar- Returns:
- the wanted classifier, i.e.
javadocortest-javadoc
-
getOutputDirectory
protected java.lang.String getOutputDirectory()
- Overrides:
getOutputDirectoryin classAbstractJavadocMojo- Returns:
- the output directory
-
getJavadocDirectory
protected java.io.File getJavadocDirectory()
- Overrides:
getJavadocDirectoryin classAbstractJavadocMojo- Returns:
- the current javadoc directory
-
getDoctitle
protected java.lang.String getDoctitle()
- Overrides:
getDoctitlein classAbstractJavadocMojo- Returns:
- the title to be placed near the top of the overview summary file
-
getOverview
protected java.io.File getOverview()
- Overrides:
getOverviewin classAbstractJavadocMojo- Returns:
- the overview documentation file from the user parameter or from the
javadocdirectory
-
getWindowtitle
protected java.lang.String getWindowtitle()
- Overrides:
getWindowtitlein classAbstractJavadocMojo- Returns:
- the title to be placed in the HTML title tag
-
getProjectBuildOutputDirs
protected java.util.List<java.io.File> getProjectBuildOutputDirs(org.apache.maven.project.MavenProject p)
- Overrides:
getProjectBuildOutputDirsin classAbstractJavadocMojo- Parameters:
p- not null maven project- Returns:
- the list of directories where compiled classes are placed for the given project. These dirs are added in the javadoc classpath.
-
getProjectSourceRoots
protected java.util.List<java.lang.String> getProjectSourceRoots(org.apache.maven.project.MavenProject p)
- Overrides:
getProjectSourceRootsin classAbstractJavadocMojo- Parameters:
p- not null maven project- Returns:
- the list of source paths for the given project
-
getExecutionProjectSourceRoots
protected java.util.List<java.lang.String> getExecutionProjectSourceRoots(org.apache.maven.project.MavenProject p)
- Overrides:
getExecutionProjectSourceRootsin classAbstractJavadocMojo- Parameters:
p- not null maven project- Returns:
- the list of source paths for the execution project of the given project
-
getDependencyScopeFilter
protected org.apache.maven.shared.artifact.filter.resolve.ScopeFilter getDependencyScopeFilter()
- Overrides:
getDependencyScopeFilterin classAbstractJavadocMojo
-
configureDependencySourceResolution
protected SourceResolverConfig configureDependencySourceResolution(SourceResolverConfig config)
Overriden to enable the resolution of -test-sources jar files. Override this method to customize the configuration for resolving dependency sources. The default behavior enables the resolution of -sources jar files.- Overrides:
configureDependencySourceResolutionin classAbstractJavadocMojo- Parameters:
config-SourceResolverConfig- Returns:
SourceResolverConfig
-
isTest
protected boolean isTest()
Description copied from class:AbstractJavadocMojoIndicates whether this goal generates documentation for theJava Test code.- Overrides:
isTestin classAbstractJavadocMojo- Returns:
trueif the goal generates Test Javadocs,falseotherwise.
-
-