@Mojo(name="descriptor", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, threadSafe=true) public class DescriptorGeneratorMojo extends AbstractGeneratorMojo
Generate a plugin descriptor.
Note: Since 3.0, for Java plugin annotations support, default phase defined by this goal is after the "compilation" of any scripts. This doesn't override the default binding coded at generate-resources phase in Maven core.
Modifier and Type | Field and Description |
---|---|
protected org.sonatype.plexus.build.incremental.BuildContext |
buildContext |
protected List<URI> |
externalJavadocBaseUrls
Creates links to existing external javadoc-generated documentation.
|
protected URI |
internalJavadocBaseUrl
The base URL for the Javadoc site containing the current project's API documentation.
|
protected String |
internalJavadocVersion
The version of the javadoc tool (equal to the container JDK version) used to generate the internal javadoc
Only relevant if
internalJavadocBaseUrl is set. |
goalPrefix, LS, project
Constructor and Description |
---|
DescriptorGeneratorMojo() |
Modifier and Type | Method and Description |
---|---|
void |
generate() |
execute
@Parameter(property="externalJavadocBaseUrls", alias="links") protected List<URI> externalJavadocBaseUrls
/package-list
or /element-list
file.
For instance:
<externalJavadocBaseUrls> <externalJavadocBaseUrl>https://docs.oracle.com/javase/8/docs/api/</externalJavadocBaseUrl> </externalJavadocBaseUrls>is valid because
https://docs.oracle.com/javase/8/docs/api/package-list
exists.
See
link option of the javadoc tool.
Using this parameter requires connectivity to the given URLs during the goal execution.@Parameter(property="internalJavadocBaseUrl") protected URI internalJavadocBaseUrl
@Parameter(property="internalJavadocVersion", defaultValue="${java.version}") protected String internalJavadocVersion
internalJavadocBaseUrl
is set.
The default value needs to be overwritten in case toolchains are being used for generating Javadoc.@Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext
public DescriptorGeneratorMojo()
public void generate() throws org.apache.maven.plugin.MojoExecutionException
generate
in class AbstractGeneratorMojo
org.apache.maven.plugin.MojoExecutionException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.