Package org.apache.maven.plugins.javadoc
Class TestJavadocJarMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.javadoc.AbstractJavadocMojo
-
- org.apache.maven.plugins.javadoc.JavadocJarMojo
-
- org.apache.maven.plugins.javadoc.TestJavadocJarMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AggregatorTestJavadocJarMojo
@Mojo(name="test-jar", defaultPhase=PACKAGE, requiresDependencyResolution=TEST, threadSafe=true) public class TestJavadocJarMojo extends JavadocJarMojo
Bundles the Javadoc documentation fortest Java code
in an NON aggregator project into a jar using the standard Javadoc Tool.- Since:
- 2.5
- Author:
- Vincent Siveton
-
-
Field Summary
-
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, mojoExecution, OPTIONS_FILE_NAME, outputDirectory, outputTimestamp, PACKAGES_FILE_NAME, project, reactorProjects, session, siteTool, skip, TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER, useStandardDocletOptions
-
-
Constructor Summary
Constructors Constructor Description TestJavadocJarMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SourceResolverConfig
configureDependencySourceResolution(SourceResolverConfig config)
Overriden to enable the resolution of -test-sources jar files.protected String
getClassifier()
protected org.eclipse.aether.util.filter.ScopeDependencyFilter
getDependencyScopeFilter()
protected String
getDoctitle()
protected List<String>
getExecutionProjectSourceRoots(org.apache.maven.project.MavenProject p)
protected File
getJavadocDirectory()
protected File
getOverview()
protected List<File>
getProjectBuildOutputDirs(org.apache.maven.project.MavenProject p)
protected List<String>
getProjectSourceRoots(org.apache.maven.project.MavenProject p)
protected String
getWindowtitle()
protected boolean
isTest()
Indicates whether this goal generates documentation for theJava Test code
.-
Methods inherited from class org.apache.maven.plugins.javadoc.JavadocJarMojo
doExecute
-
Methods inherited from class org.apache.maven.plugins.javadoc.AbstractJavadocMojo
buildJavadocOptions, canGenerateReport, execute, executeReport, failOnError, getAttachmentClassifier, getClassesFile, getDefaultJavadocApiLink, getDependencySourcePaths, getDoclint, getFiles, getJavadocOptionsFile, getOutputDirectory, getPluginReportOutputDirectory, getProject, getReactorProjects, getSourcePaths, getToolchain, isAggregator, isSkippedJavadoc, isSkippedModule, isValidJavadocLink, logError, resolveDependency, verifyRemovedParameter
-
-
-
-
Method Detail
-
getClassifier
protected String getClassifier()
- Overrides:
getClassifier
in classJavadocJarMojo
- Returns:
- the wanted classifier, i.e.
javadoc
ortest-javadoc
-
getJavadocDirectory
protected File getJavadocDirectory()
- Overrides:
getJavadocDirectory
in classAbstractJavadocMojo
- Returns:
- the current javadoc directory
-
getDoctitle
protected String getDoctitle()
- Overrides:
getDoctitle
in classAbstractJavadocMojo
- Returns:
- the title to be placed near the top of the overview summary file
-
getOverview
protected File getOverview()
- Overrides:
getOverview
in classAbstractJavadocMojo
- Returns:
- the overview documentation file from the user parameter or from the
javadocdirectory
-
getWindowtitle
protected String getWindowtitle()
- Overrides:
getWindowtitle
in classAbstractJavadocMojo
- Returns:
- the title to be placed in the HTML title tag
-
getProjectBuildOutputDirs
protected List<File> getProjectBuildOutputDirs(org.apache.maven.project.MavenProject p)
- Overrides:
getProjectBuildOutputDirs
in 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 to the javadoc classpath.
-
getProjectSourceRoots
protected List<String> getProjectSourceRoots(org.apache.maven.project.MavenProject p)
- Overrides:
getProjectSourceRoots
in classAbstractJavadocMojo
- Parameters:
p
- not null maven project- Returns:
- the list of source paths for the given project
-
getExecutionProjectSourceRoots
protected List<String> getExecutionProjectSourceRoots(org.apache.maven.project.MavenProject p)
- Overrides:
getExecutionProjectSourceRoots
in classAbstractJavadocMojo
- Parameters:
p
- not null maven project- Returns:
- the list of source paths for the execution project of the given project
-
getDependencyScopeFilter
protected org.eclipse.aether.util.filter.ScopeDependencyFilter getDependencyScopeFilter()
- Overrides:
getDependencyScopeFilter
in 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:
configureDependencySourceResolution
in classAbstractJavadocMojo
- Parameters:
config
-SourceResolverConfig
- Returns:
SourceResolverConfig
-
isTest
protected boolean isTest()
Description copied from class:AbstractJavadocMojo
Indicates whether this goal generates documentation for theJava Test code
.- Overrides:
isTest
in classAbstractJavadocMojo
- Returns:
true
if the goal generates Test Javadocs,false
otherwise.
-
-