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 for
test Java code
in a 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
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ConstructorDescriptionTestJavadocJarMojo
(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver, org.apache.maven.doxia.tools.SiteTool siteTool, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, ResourceResolver resourceResolver, org.eclipse.aether.RepositorySystem repoSystem, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.apache.maven.project.ProjectBuilder mavenProjectBuilder, org.apache.maven.toolchain.ToolchainManager toolchainManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected SourceResolverConfig
Overridden to enable the resolution of -test-sources jar files.protected String
protected org.eclipse.aether.util.filter.ScopeDependencyFilter
protected String
getExecutionProjectSourceRoots
(org.apache.maven.project.MavenProject p) protected File
protected File
getProjectBuildOutputDirs
(org.apache.maven.project.MavenProject p) getProjectSourceRoots
(org.apache.maven.project.MavenProject p) protected String
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
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
TestJavadocJarMojo
@Inject public TestJavadocJarMojo(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver, org.apache.maven.doxia.tools.SiteTool siteTool, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, ResourceResolver resourceResolver, org.eclipse.aether.RepositorySystem repoSystem, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.apache.maven.project.ProjectBuilder mavenProjectBuilder, org.apache.maven.toolchain.ToolchainManager toolchainManager)
-
-
Method Details
-
getClassifier
- Overrides:
getClassifier
in classJavadocJarMojo
- Returns:
- the wanted classifier, i.e.
javadoc
ortest-javadoc
-
getJavadocDirectory
- Overrides:
getJavadocDirectory
in classAbstractJavadocMojo
- Returns:
- the current javadoc directory
-
getDoctitle
- Overrides:
getDoctitle
in classAbstractJavadocMojo
- Returns:
- the title to be placed near the top of the overview summary file
-
getOverview
- Overrides:
getOverview
in classAbstractJavadocMojo
- Returns:
- the overview documentation file from the user parameter or from the
javadocdirectory
-
getWindowtitle
- Overrides:
getWindowtitle
in classAbstractJavadocMojo
- Returns:
- the title to be placed in the HTML title tag
-
getProjectBuildOutputDirs
- 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
- Overrides:
getProjectSourceRoots
in classAbstractJavadocMojo
- Parameters:
p
- not null maven project- Returns:
- the list of source paths for the given project
-
getExecutionProjectSourceRoots
- 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
Overridden 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.
-