Package org.apache.maven.tools.plugin
Class DefaultPluginToolsRequest
java.lang.Object
org.apache.maven.tools.plugin.DefaultPluginToolsRequest
- All Implemented Interfaces:
PluginToolsRequest
Default implementation of
PluginToolsRequest, which is used to pass parameters to components used to extract
MojoDescriptor instances from different types of metadata
for a given plugin.- Since:
- 2.5
- Author:
- jdcasey
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPluginToolsRequest(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) -
Method Summary
Modifier and TypeMethodDescriptionSet<org.apache.maven.artifact.Artifact>Returns the list ofArtifactused in class path scanning for annotationsGets the file encoding of the source files.org.apache.maven.artifact.repository.ArtifactRepositorygetLocal()org.apache.maven.plugin.descriptor.PluginDescriptororg.apache.maven.project.MavenProjectList<org.apache.maven.artifact.repository.ArtifactRepository>org.apache.maven.settings.SettingsbooleansetDependencies(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) setLocal(org.apache.maven.artifact.repository.ArtifactRepository local) setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) setProject(org.apache.maven.project.MavenProject project) setRemoteRepos(List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos) setSettings(org.apache.maven.settings.Settings settings) setSkipErrorNoDescriptorsFound(boolean skipErrorNoDescriptorsFound) By default an exception is throw if no mojo descriptor is found.
-
Constructor Details
-
DefaultPluginToolsRequest
public DefaultPluginToolsRequest(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
-
-
Method Details
-
getPluginDescriptor
- Specified by:
getPluginDescriptorin interfacePluginToolsRequest- Returns:
- Return the
PluginDescriptorcurrently being populated as part of the build of the current plugin project.
-
setPluginDescriptor
public PluginToolsRequest setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) - Specified by:
setPluginDescriptorin interfacePluginToolsRequest- Parameters:
pluginDescriptor- thePluginDescriptor- Returns:
- This request.
- See Also:
-
getProject
- Specified by:
getProjectin interfacePluginToolsRequest- Returns:
- Return the current
MavenProjectinstance in use.
-
setProject
- Specified by:
setProjectin interfacePluginToolsRequest- Parameters:
project- the currentMavenProject- Returns:
- This request.
- See Also:
-
getEncoding
Gets the file encoding of the source files.- Specified by:
getEncodingin interfacePluginToolsRequest- Returns:
- The file encoding of the source files, never
null.
-
setEncoding
Sets the file encoding of the source files.- Specified by:
setEncodingin interfacePluginToolsRequest- Parameters:
encoding- The file encoding of the source files, may be empty ornullto use the platform's default encoding.- Returns:
- This request.
-
isSkipErrorNoDescriptorsFound
- Specified by:
isSkipErrorNoDescriptorsFoundin interfacePluginToolsRequest- Returns:
trueif no descriptor found should not cause a failure
-
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- Specified by:
setSkipErrorNoDescriptorsFoundin interfacePluginToolsRequest- Parameters:
skipErrorNoDescriptorsFound-trueto skip errors because of not found descriptors- Returns:
- This request.
-
getDependencies
Description copied from interface:PluginToolsRequestReturns the list ofArtifactused in class path scanning for annotations- Specified by:
getDependenciesin interfacePluginToolsRequest- Returns:
- the dependencies
-
setDependencies
- Specified by:
setDependenciesin interfacePluginToolsRequest- Parameters:
dependencies- the dependencies- Returns:
- This request.
-
getRemoteRepos
- Specified by:
getRemoteReposin interfacePluginToolsRequest- Returns:
- the remote repositories
-
setRemoteRepos
public PluginToolsRequest setRemoteRepos(List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos) - Specified by:
setRemoteReposin interfacePluginToolsRequest- Parameters:
remoteRepos- the remote repositories- Returns:
- This request.
-
getLocal
- Specified by:
getLocalin interfacePluginToolsRequest- Returns:
- the local artifact repository
-
setLocal
- Specified by:
setLocalin interfacePluginToolsRequest- Parameters:
local- the local repository- Returns:
- This request.
-
setInternalJavadocBaseUrl
- Specified by:
setInternalJavadocBaseUrlin interfacePluginToolsRequest- Parameters:
baseUrl- may be relative to the current site's root- Returns:
- This request.
-
getInternalJavadocBaseUrl
- Specified by:
getInternalJavadocBaseUrlin interfacePluginToolsRequest- Returns:
- the javadoc base url for the internal classes
-
setInternalJavadocVersion
- Specified by:
setInternalJavadocVersionin interfacePluginToolsRequest- Returns:
- This request.
-
getInternalJavadocVersion
- Specified by:
getInternalJavadocVersionin interfacePluginToolsRequest- Returns:
- the javadoc version used to create the internal javadoc site
-
setExternalJavadocBaseUrls
- Specified by:
setExternalJavadocBaseUrlsin interfacePluginToolsRequest- Returns:
- This request.
-
getExternalJavadocBaseUrls
- Specified by:
getExternalJavadocBaseUrlsin interfacePluginToolsRequest- Returns:
- the list of external javadoc base urls to consider
-
setSettings
- Specified by:
setSettingsin interfacePluginToolsRequest- Parameters:
settings- the Maven settings- Returns:
- This request.
-
getSettings
- Specified by:
getSettingsin interfacePluginToolsRequest- Returns:
- the Maven settings
-