public abstract class AbstractJavadocMojo extends AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
aggregate
Deprecated.
since 2.5. Use the goals
javadoc:aggregate and javadoc:test-aggregate instead. |
protected static String |
ARGFILE_FILE_NAME
The
argfile file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @files |
protected static String |
DEBUG_JAVADOC_SCRIPT_NAME
The Javadoc script file name when
debug parameter is on, i.e. |
static Properties |
DEFAULT_JAVA_API_LINKS
The default Javadoc API urls according the
Sun API Specifications:
|
protected boolean |
failOnError
Specifies if the build will fail if there are errors during javadoc execution or not.
|
protected static String |
FILES_FILE_NAME
The
files file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @files |
static String |
JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
Classifier used in the name of the javadoc-options XML file, and in the resources bundle
artifact that gets attached to the project.
|
protected ArrayList<String> |
links
Creates links to existing javadoc-generated documentation of external referenced classes.
|
protected static String |
OPTIONS_FILE_NAME
The
options file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @files |
protected File |
outputDirectory
Specifies the destination directory where javadoc saves the generated HTML files.
|
protected static String |
PACKAGES_FILE_NAME
The
packages file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @files |
protected MavenProject |
project
The Maven Project Object
|
protected boolean |
skip
Specifies whether the Javadoc generation should be skipped.
|
static String |
TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
Classifier used in the name of the javadoc-options XML file, and in the resources bundle
artifact that gets attached to the project.
|
protected boolean |
useStandardDocletOptions
Specifies to use the
options provided by the Standard Doclet for a custom doclet.
|
| Constructor and Description |
|---|
AbstractJavadocMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected JavadocOptions |
buildJavadocOptions()
Generate a javadoc-options XML file, for either bundling with a javadoc-resources artifact OR
supplying to a distro module in a includeDependencySources configuration, so the javadoc options
from this execution can be reconstructed and merged in the distro build.
|
protected boolean |
canGenerateReport(List<String> files)
Method that indicates whether the javadoc can be generated or not.
|
protected SourceResolverConfig |
configureDependencySourceResolution(SourceResolverConfig config)
Override this method to customize the configuration for resolving dependency sources.
|
protected void |
executeReport(Locale unusedLocale)
The package documentation details the
Javadoc Options used by this Plugin.
|
protected void |
failOnError(String prefix,
Exception e) |
protected String |
getAttachmentClassifier()
Override this if you need to provide a bundle attachment classifier, as in the case of test
javadocs.
|
protected List<Artifact> |
getCompileArtifacts(ArtifactResolutionResult result) |
protected List<String> |
getDependencySourcePaths()
Resolve dependency sources so they can be included directly in the javadoc process.
|
protected String |
getDoctitle() |
protected List<String> |
getExecutionProjectSourceRoots(MavenProject p) |
protected List<String> |
getFiles(List<String> sourcePaths)
Method to get the files on the specified source paths
|
protected File |
getJavadocDirectory() |
protected File |
getJavadocOptionsFile()
Construct the output file for the generated javadoc-options XML file, after creating the
javadocOptionsDir if necessary.
|
protected String |
getOutputDirectory() |
protected File |
getOverview() |
protected MavenProject |
getProject() |
protected List<Artifact> |
getProjectArtifacts(MavenProject p) |
protected List<String> |
getProjectBuildOutputDirs(MavenProject p) |
protected List<String> |
getProjectSourceRoots(MavenProject p) |
protected List<String> |
getSourcePaths()
Method to get the source paths.
|
protected String |
getWindowtitle() |
protected boolean |
isAggregator()
Indicates whether this goal is flagged with
@aggregator. |
protected void |
logError(String message,
Throwable t)
Logs an error with throwable content only if in debug.
|
Artifact |
resolveDependency(Dependency dependency) |
getLog, getPluginContext, setLog, setPluginContextpublic static final String JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER,
Constant Field Valuespublic static final String TEST_JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER
JAVADOC_RESOURCES_ATTACHMENT_CLASSIFIER,
Constant Field Valuespublic static final Properties DEFAULT_JAVA_API_LINKS
<javaApiLinks>
<property>
<name>api_1.3</name>
<value>http://docs.oracle.com/javase/1.3/docs/api/</value>
</property>
<property>
<name>api_1.4</name>
<value>http://docs.oracle.com/javase/1.4.2/docs/api/</value>
</property>
<property>
<name>api_1.5</name>
<value>http://docs.oracle.com/javase/1.5.0/docs/api/</value>
</property>
<property>
<name>api_1.6</name>
<value>http://docs.oracle.com/javase/6/docs/api/</value>
</property>
<property>
<name>api_1.7</name>
<value>http://docs.oracle.com/javase/7/docs/api/</value>
</property>
</javaApiLinks>
protected static final String DEBUG_JAVADOC_SCRIPT_NAME
debug parameter is on, i.e. javadoc.bat or javadoc.shprotected static final String OPTIONS_FILE_NAME
options file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @filesprotected static final String PACKAGES_FILE_NAME
packages file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @filesprotected static final String ARGFILE_FILE_NAME
argfile file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @filesprotected static final String FILES_FILE_NAME
files file name in the output directory when calling:
javadoc.exe(or .sh) @options @packages | @argfile | @files@Component protected MavenProject project
@Parameter(property="aggregate", defaultValue="false") protected boolean aggregate
javadoc:aggregate and javadoc:test-aggregate instead.@Parameter(property="maven.javadoc.skip", defaultValue="false") protected boolean skip
@Parameter(property="maven.javadoc.failOnError", defaultValue="true") protected boolean failOnError
@Parameter(property="useStandardDocletOptions", defaultValue="true") protected boolean useStandardDocletOptions
<docletArtifacts> <docletArtifact> <groupId>com.sun.tools.doclets</groupId> <artifactId>doccheck</artifactId> <version>1.2b2</version> </docletArtifact> </docletArtifacts> <useStandardDocletOptions>true</useStandardDocletOptions>
@Parameter(property="links") protected ArrayList<String> links
isOffline is set to false./package-list file. For instance:
<links> <link>http://docs.oracle.com/javase/1.4.2/docs/api</link> <links>will be used because
http://docs.oracle.com/javase/1.4.2/docs/api/package-list exists.detectLinks is defined, the links between the project dependencies are
automatically added.detectJavaApiLink is defined, a Java API link, based on the Java version of the
project's sources, will be added automatically.detectLinks,
detectJavaApiLink@Parameter(property="destDir", alias="destDir", defaultValue="${project.build.directory}/apidocs", required=true) protected File outputDirectory
protected boolean isAggregator()
@aggregator.true if the goal is designed as an aggregator, false otherwise.AggregatorJavadocReport,
AggregatorTestJavadocReportprotected String getOutputDirectory()
protected MavenProject getProject()
protected List<String> getProjectBuildOutputDirs(MavenProject p)
p - not null maven projectprotected List<String> getProjectSourceRoots(MavenProject p)
p - not null maven projectprotected List<String> getExecutionProjectSourceRoots(MavenProject p)
p - not null maven projectprotected List<Artifact> getProjectArtifacts(MavenProject p)
p - not null maven projectprotected File getJavadocDirectory()
protected String getDoctitle()
protected File getOverview()
javadocdirectoryprotected String getWindowtitle()
protected void executeReport(Locale unusedLocale) throws MavenReportException
unusedLocale - the wanted locale (actually unused).MavenReportException - if anyprotected List<String> getFiles(List<String> sourcePaths) throws MavenReportException
sourcePaths - a List that contains the paths to the source filesMavenReportExceptionprotected List<String> getSourcePaths() throws MavenReportException
StringMavenReportExceptionJavadocUtil.pruneDirs(MavenProject, List)protected SourceResolverConfig configureDependencySourceResolution(SourceResolverConfig config)
protected final List<String> getDependencySourcePaths() throws MavenReportException
configureDependencySourceResolution(SourceResolverConfig).MavenReportExceptionprotected boolean canGenerateReport(List<String> files)
files - the project filesprotected List<Artifact> getCompileArtifacts(ArtifactResolutionResult result)
result - not nullJavadocUtil.getCompileArtifacts(Set, boolean)public Artifact resolveDependency(Dependency dependency) throws MavenReportException
MavenReportExceptionprotected final File getJavadocOptionsFile()
protected final JavadocOptions buildJavadocOptions() throws IOException
IOExceptionprotected String getAttachmentClassifier()
protected void logError(String message, Throwable t)
message - t - protected void failOnError(String prefix, Exception e) throws MojoExecutionException
MojoExecutionExceptionCopyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.