Package org.apache.maven.plugins.javadoc
Class JavadocJar
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.javadoc.AbstractJavadocMojo
-
- org.apache.maven.plugins.javadoc.JavadocJar
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AggregatorJavadocJar,TestJavadocJar
@Mojo(name="jar", defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE, threadSafe=true) public class JavadocJar extends AbstractJavadocMojoBundles the Javadoc documentation formain Java codein an NON aggregator project into a jar using the standard Javadoc Tool.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.archiver.MavenArchiveConfigurationarchiveThe archive configuration to use.private booleanattachSpecifies whether to attach the generated artifact to the project helper.private java.lang.Stringclassifierprivate static java.lang.String[]DEFAULT_EXCLUDESExcludes all processing files.private static java.lang.String[]DEFAULT_INCLUDESIncludes all generated Javadoc filesprivate java.io.FiledefaultManifestFilePath to the default MANIFEST file to use.private java.io.FiledestDirDeprecated.private java.lang.StringfinalNameSpecifies the filename that will be used for the generated jar file.private org.codehaus.plexus.archiver.jar.JarArchiverjarArchiverThe Jar archiver.private java.lang.StringjarOutputDirectorySpecifies the directory where the generated jar file will be put.private java.lang.StringoutputTimestampTimestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXXor as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).private org.apache.maven.project.MavenProjectHelperprojectHelperUsed for attaching the artifact in the project.private booleanuseDefaultManifestFileSet this totrueto enable the use of thedefaultManifestFile.-
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 JavadocJar()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoExecute()private java.io.FilegenerateArchive(java.io.File javadocFiles, java.lang.String jarFileName)Method that creates the jar fileprotected java.lang.StringgetClassifier()-
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
-
DEFAULT_INCLUDES
private static final java.lang.String[] DEFAULT_INCLUDES
Includes all generated Javadoc files
-
DEFAULT_EXCLUDES
private static final java.lang.String[] DEFAULT_EXCLUDES
Excludes all processing files.
-
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
Used for attaching the artifact in the project.
-
jarArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiverThe Jar archiver.- Since:
- 2.5
-
destDir
@Deprecated @Parameter(property="destDir") private java.io.File destDir
Deprecated.Specifies the destination directory where javadoc saves the generated HTML files. See d.
-
jarOutputDirectory
@Parameter(property="project.build.directory") private java.lang.String jarOutputDirectory
Specifies the directory where the generated jar file will be put.
-
finalName
@Parameter(property="project.build.finalName") private java.lang.String finalName
Specifies the filename that will be used for the generated jar file. Please note that-javadocor-test-javadocwill be appended to the file name.
-
attach
@Parameter(property="attach", defaultValue="true") private boolean attachSpecifies whether to attach the generated artifact to the project helper.
-
archive
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archive
The archive configuration to use. See Maven Archiver Reference.- Since:
- 2.5
-
defaultManifestFile
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF", required=true, readonly=true) private java.io.File defaultManifestFilePath to the default MANIFEST file to use. It will be used ifuseDefaultManifestFileis set totrue.- Since:
- 2.5
-
useDefaultManifestFile
@Parameter(defaultValue="false") private boolean useDefaultManifestFile
Set this totrueto enable the use of thedefaultManifestFile.- Since:
- 2.5
-
classifier
@Parameter(property="maven.javadoc.classifier", defaultValue="javadoc", required=true) private java.lang.String classifier- Since:
- 2.10
-
outputTimestamp
@Parameter(defaultValue="${project.build.outputTimestamp}") private java.lang.String outputTimestampTimestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXXor as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Since:
- 3.2.0
-
-
Method Detail
-
doExecute
public void doExecute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
doExecutein classAbstractJavadocMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getClassifier
protected java.lang.String getClassifier()
- Returns:
- the wanted classifier, i.e.
javadocortest-javadoc
-
generateArchive
private java.io.File generateArchive(java.io.File javadocFiles, java.lang.String jarFileName) throws org.codehaus.plexus.archiver.ArchiverException, java.io.IOExceptionMethod that creates the jar file- Parameters:
javadocFiles- the directory where the generated jar file will be putjarFileName- the filename of the generated jar file- Returns:
- a File object that contains the generated jar file
- Throws:
org.codehaus.plexus.archiver.ArchiverException-ArchiverExceptionjava.io.IOException-IOException
-
-