Package org.apache.maven.tools.plugin
Interface PluginToolsRequest
- All Known Implementing Classes:
DefaultPluginToolsRequest
public interface PluginToolsRequest
Request that encapsulates all information relevant to the process of extracting
MojoDescriptor
instances from metadata for a certain type of mojo.- Since:
- 2.5
- Author:
- jdcasey
-
Method Summary
Modifier and TypeMethodDescriptionSet
<org.apache.maven.artifact.Artifact> Returns the list ofArtifact
used in class path scanning for annotationsGets the file encoding of the source files.org.apache.maven.plugin.descriptor.PluginDescriptor
org.apache.maven.project.MavenProject
org.eclipse.aether.RepositorySystemSession
Return a Repository Sessionorg.apache.maven.settings.Settings
boolean
setDependencies
(Set<org.apache.maven.artifact.Artifact> dependencies) setEncoding
(String encoding) Sets the file encoding of the source files.setExternalJavadocBaseUrls
(List<URI> javadocLinks) setInternalJavadocBaseUrl
(URI baseUrl) setInternalJavadocVersion
(String javadocVersion) setPluginDescriptor
(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) setProject
(org.apache.maven.project.MavenProject project) void
setRepoSession
(org.eclipse.aether.RepositorySystemSession repoSession) Set a Repository SessionsetRequiredJavaVersion
(String requiredJavaVersion) setSettings
(org.apache.maven.settings.Settings settings) setSkipErrorNoDescriptorsFound
(boolean skipErrorNoDescriptorsFound) By default an exception is throw if no mojo descriptor is found.setUsedMavenApiVersion
(String mavenApiVersion)
-
Method Details
-
getProject
org.apache.maven.project.MavenProject getProject()- Returns:
- Return the current
MavenProject
instance in use.
-
setProject
- Parameters:
project
- the currentMavenProject
- Returns:
- This request.
- See Also:
-
getPluginDescriptor
org.apache.maven.plugin.descriptor.PluginDescriptor getPluginDescriptor()- Returns:
- Return the
PluginDescriptor
currently being populated as part of the build of the current plugin project.
-
setPluginDescriptor
PluginToolsRequest setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) - Parameters:
pluginDescriptor
- thePluginDescriptor
- Returns:
- This request.
- See Also:
-
getEncoding
Gets the file encoding of the source files.- Returns:
- The file encoding of the source files, never
null
.
-
setEncoding
Sets the file encoding of the source files.- Parameters:
encoding
- The file encoding of the source files, may be empty ornull
to use the platform's default encoding.- Returns:
- This request.
-
setSkipErrorNoDescriptorsFound
By default an exception is throw if no mojo descriptor is found. As the maven-plugin is defined in core, the descriptor generator mojo is bound to generate-resources phase. But for annotations, the compiled classes are needed, so skip error- Parameters:
skipErrorNoDescriptorsFound
-true
to skip errors because of not found descriptors- Returns:
- This request.
- Since:
- 3.0
-
isSkipErrorNoDescriptorsFound
boolean isSkipErrorNoDescriptorsFound()- Returns:
true
if no descriptor found should not cause a failure- Since:
- 3.0
-
getDependencies
Set<org.apache.maven.artifact.Artifact> getDependencies()Returns the list ofArtifact
used in class path scanning for annotations- Returns:
- the dependencies
- Since:
- 3.0
-
setDependencies
- Parameters:
dependencies
- the dependencies- Returns:
- This request.
- Since:
- 3.0
-
getRepoSession
org.eclipse.aether.RepositorySystemSession getRepoSession()Return a Repository Session- Returns:
- a Repository Session
- Since:
- 3.8.2
-
setRepoSession
Set a Repository Session- Parameters:
repoSession
- a Repository Session- Since:
- 3.8.2
-
setInternalJavadocBaseUrl
- Parameters:
baseUrl
- may be relative to the current site's root- Returns:
- This request.
- Since:
- 3.7.0
-
getInternalJavadocBaseUrl
- Returns:
- the javadoc base url for the internal classes
- Since:
- 3.7.0
-
setInternalJavadocVersion
- Parameters:
javadocVersion
-- Returns:
- This request.
- Since:
- 3.7.0
-
getInternalJavadocVersion
- Returns:
- the javadoc version used to create the internal javadoc site
- Since:
- 3.7.0
-
setExternalJavadocBaseUrls
- Parameters:
javadocLinks
-- Returns:
- This request.
- Since:
- 3.7.0
-
getExternalJavadocBaseUrls
- Returns:
- the list of external javadoc base urls to consider
- Since:
- 3.7.0
-
setSettings
- Parameters:
settings
- the Maven settings- Returns:
- This request.
- Since:
- 3.7.0
-
getSettings
org.apache.maven.settings.Settings getSettings()- Returns:
- the Maven settings
- Since:
- 3.7.0
-
setRequiredJavaVersion
- Parameters:
requiredJavaVersion
- the required Java version for this plugin ornull
if unknown. Must be a value according to semantics ofVersionConstraint
.- Returns:
- This request.
- Since:
- 3.8.0
-
getRequiredJavaVersion
- Returns:
- the required Java version for this plugin or
null
if unknown. Is a value according to semantics ofVersionConstraint
. - Since:
- 3.8.0
-
setUsedMavenApiVersion
- Parameters:
mavenApiVersion
-- Returns:
- his request.
- Since:
- 3.8.0
-
getUsedMavenApiVersion
- Returns:
- the Maven API version being referenced or
null
if unknown - Since:
- 3.8.0
-