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 SummaryConstructorsConstructorDescriptionDefaultPluginToolsRequest(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) 
- 
Method SummaryModifier 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.plugin.descriptor.PluginDescriptororg.apache.maven.project.MavenProjectorg.eclipse.aether.RepositorySystemSessionReturn a Repository Sessionorg.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) setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) setProject(org.apache.maven.project.MavenProject project) voidsetRepoSession(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) 
- 
Constructor Details- 
DefaultPluginToolsRequestpublic DefaultPluginToolsRequest(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) 
 
- 
- 
Method Details- 
getPluginDescriptor- Specified by:
- getPluginDescriptorin interface- PluginToolsRequest
- Returns:
- Return the PluginDescriptorcurrently being populated as part of the build of the current plugin project.
 
- 
setPluginDescriptorpublic PluginToolsRequest setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) - Specified by:
- setPluginDescriptorin interface- PluginToolsRequest
- Parameters:
- pluginDescriptor- the- PluginDescriptor
- Returns:
- This request.
- See Also:
 
- 
getProject- Specified by:
- getProjectin interface- PluginToolsRequest
- Returns:
- Return the current MavenProjectinstance in use.
 
- 
setProject- Specified by:
- setProjectin interface- PluginToolsRequest
- Parameters:
- project- the current- MavenProject
- Returns:
- This request.
- See Also:
 
- 
getEncodingGets the file encoding of the source files.- Specified by:
- getEncodingin interface- PluginToolsRequest
- Returns:
- The file encoding of the source files, never null.
 
- 
setEncodingSets the file encoding of the source files.- Specified by:
- setEncodingin interface- PluginToolsRequest
- Parameters:
- encoding- The file encoding of the source files, may be empty or- nullto use the platform's default encoding.
- Returns:
- This request.
 
- 
isSkipErrorNoDescriptorsFound- Specified by:
- isSkipErrorNoDescriptorsFoundin interface- PluginToolsRequest
- Returns:
- trueif no descriptor found should not cause a failure
 
- 
setSkipErrorNoDescriptorsFoundBy 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 interface- PluginToolsRequest
- Parameters:
- skipErrorNoDescriptorsFound-- trueto skip errors because of not found descriptors
- Returns:
- This request.
 
- 
getDependenciesDescription copied from interface:PluginToolsRequestReturns the list ofArtifactused in class path scanning for annotations- Specified by:
- getDependenciesin interface- PluginToolsRequest
- Returns:
- the dependencies
 
- 
setDependencies- Specified by:
- setDependenciesin interface- PluginToolsRequest
- Parameters:
- dependencies- the dependencies
- Returns:
- This request.
 
- 
getRepoSessionDescription copied from interface:PluginToolsRequestReturn a Repository Session- Specified by:
- getRepoSessionin interface- PluginToolsRequest
- Returns:
- a Repository Session
 
- 
setRepoSessionDescription copied from interface:PluginToolsRequestSet a Repository Session- Specified by:
- setRepoSessionin interface- PluginToolsRequest
- Parameters:
- repoSession- a Repository Session
 
- 
setInternalJavadocBaseUrl- Specified by:
- setInternalJavadocBaseUrlin interface- PluginToolsRequest
- Parameters:
- baseUrl- may be relative to the current site's root
- Returns:
- This request.
 
- 
getInternalJavadocBaseUrl- Specified by:
- getInternalJavadocBaseUrlin interface- PluginToolsRequest
- Returns:
- the javadoc base url for the internal classes
 
- 
setInternalJavadocVersion- Specified by:
- setInternalJavadocVersionin interface- PluginToolsRequest
- Parameters:
- javadocVersion-
- Returns:
- This request.
 
- 
getInternalJavadocVersion- Specified by:
- getInternalJavadocVersionin interface- PluginToolsRequest
- Returns:
- the javadoc version used to create the internal javadoc site
 
- 
setExternalJavadocBaseUrls- Specified by:
- setExternalJavadocBaseUrlsin interface- PluginToolsRequest
- Parameters:
- javadocLinks-
- Returns:
- This request.
 
- 
getExternalJavadocBaseUrls- Specified by:
- getExternalJavadocBaseUrlsin interface- PluginToolsRequest
- Returns:
- the list of external javadoc base urls to consider
 
- 
setSettings- Specified by:
- setSettingsin interface- PluginToolsRequest
- Parameters:
- settings- the Maven settings
- Returns:
- This request.
 
- 
getSettings- Specified by:
- getSettingsin interface- PluginToolsRequest
- Returns:
- the Maven settings
 
- 
setRequiredJavaVersion- Specified by:
- setRequiredJavaVersionin interface- PluginToolsRequest
- Parameters:
- requiredJavaVersion- the required Java version for this plugin or- nullif unknown. Must be a value according to semantics of- VersionConstraint.
- Returns:
- This request.
 
- 
getRequiredJavaVersion- Specified by:
- getRequiredJavaVersionin interface- PluginToolsRequest
- Returns:
- the required Java version for this plugin or nullif unknown. Is a value according to semantics ofVersionConstraint.
 
- 
setUsedMavenApiVersion- Specified by:
- setUsedMavenApiVersionin interface- PluginToolsRequest
- Parameters:
- mavenApiVersion-
- Returns:
- his request.
 
- 
getUsedMavenApiVersion- Specified by:
- getUsedMavenApiVersionin interface- PluginToolsRequest
- Returns:
- the Maven API version being referenced or nullif unknown
 
 
-