@Mojo(name="jar", defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE, threadSafe=true) public class JavadocJar extends AbstractJavadocMojo
main Java code
in an NON aggregator project into
a jar using the standard Javadoc Tool.Modifier and Type | Field and Description |
---|---|
private org.apache.maven.archiver.MavenArchiveConfiguration |
archive
The archive configuration to use.
|
private boolean |
attach
Specifies whether to attach the generated artifact to the project helper.
|
private java.lang.String |
classifier |
private static java.lang.String[] |
DEFAULT_EXCLUDES
Excludes all processing files.
|
private static java.lang.String[] |
DEFAULT_INCLUDES
Includes all generated Javadoc files
|
private java.io.File |
defaultManifestFile
Path to the default MANIFEST file to use.
|
private java.io.File |
destDir
Deprecated.
|
private java.lang.String |
finalName
Specifies the filename that will be used for the generated jar file.
|
private org.codehaus.plexus.archiver.jar.JarArchiver |
jarArchiver
The Jar archiver.
|
private java.lang.String |
jarOutputDirectory
Specifies the directory where the generated jar file will be put.
|
private org.apache.maven.project.MavenProjectHelper |
projectHelper
Used for attaching the artifact in the project.
|
private boolean |
useDefaultManifestFile
Set this to
true to enable the use of the defaultManifestFile . |
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 |
---|
JavadocJar() |
Modifier and Type | Method and Description |
---|---|
void |
doExecute() |
private java.io.File |
generateArchive(java.io.File javadocFiles,
java.lang.String jarFileName)
Method that creates the jar file
|
protected java.lang.String |
getClassifier() |
buildJavadocOptions, canGenerateReport, collect, configureDependencySourceResolution, execute, executeReport, failOnError, getAttachmentClassifier, getDependencyScopeFilter, getDependencySourcePaths, getDoclint, getDoctitle, getExecutionProjectSourceRoots, getFiles, getJavadocDirectory, getJavadocOptionsFile, getOutputDirectory, getOverview, getProject, getProjectBuildOutputDirs, getProjectSourceRoots, getSourcePaths, getToolchain, getWindowtitle, isAggregator, isTest, isValidJavadocLink, logError, resolveDependency, verifyRemovedParameter
private static final java.lang.String[] DEFAULT_INCLUDES
private static final java.lang.String[] DEFAULT_EXCLUDES
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
@Deprecated @Parameter(property="destDir") private java.io.File destDir
@Parameter(property="project.build.directory") private java.lang.String jarOutputDirectory
@Parameter(property="project.build.finalName") private java.lang.String finalName
-javadoc
or -test-javadoc
will be appended to the file name.@Parameter(property="attach", defaultValue="true") private boolean attach
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archive
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/MANIFEST.MF", required=true, readonly=true) private java.io.File defaultManifestFile
useDefaultManifestFile
is set to true
.@Parameter(defaultValue="false") private boolean useDefaultManifestFile
true
to enable the use of the defaultManifestFile
.
@Parameter(property="maven.javadoc.classifier", defaultValue="javadoc", required=true) private java.lang.String classifier
public void doExecute() throws org.apache.maven.plugin.MojoExecutionException
doExecute
in class AbstractJavadocMojo
org.apache.maven.plugin.MojoExecutionException
protected java.lang.String getClassifier()
javadoc
or test-javadoc
private java.io.File generateArchive(java.io.File javadocFiles, java.lang.String jarFileName) throws org.codehaus.plexus.archiver.ArchiverException, java.io.IOException
javadocFiles
- the directory where the generated jar file will be putjarFileName
- the filename of the generated jar fileorg.codehaus.plexus.archiver.ArchiverException
- ArchiverException
java.io.IOException
- IOException