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.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
- 
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.
 
 - 
getRepoSession
Description copied from interface:PluginToolsRequestReturn a Repository Session- Specified by:
 getRepoSessionin interfacePluginToolsRequest- Returns:
 - a Repository Session
 
 - 
setRepoSession
Description copied from interface:PluginToolsRequestSet a Repository Session- Specified by:
 setRepoSessionin interfacePluginToolsRequest- Parameters:
 repoSession- a Repository Session
 - 
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- Parameters:
 javadocVersion-- Returns:
 - This request.
 
 - 
getInternalJavadocVersion
- Specified by:
 getInternalJavadocVersionin interfacePluginToolsRequest- Returns:
 - the javadoc version used to create the internal javadoc site
 
 - 
setExternalJavadocBaseUrls
- Specified by:
 setExternalJavadocBaseUrlsin interfacePluginToolsRequest- Parameters:
 javadocLinks-- 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
 
 - 
setRequiredJavaVersion
- Specified by:
 setRequiredJavaVersionin interfacePluginToolsRequest- Parameters:
 requiredJavaVersion- the required Java version for this plugin ornullif unknown. Must be a value according to semantics ofVersionConstraint.- Returns:
 - This request.
 
 - 
getRequiredJavaVersion
- Specified by:
 getRequiredJavaVersionin interfacePluginToolsRequest- Returns:
 - the required Java version for this plugin or 
nullif unknown. Is a value according to semantics ofVersionConstraint. 
 - 
setUsedMavenApiVersion
- Specified by:
 setUsedMavenApiVersionin interfacePluginToolsRequest- Parameters:
 mavenApiVersion-- Returns:
 - his request.
 
 - 
getUsedMavenApiVersion
- Specified by:
 getUsedMavenApiVersionin interfacePluginToolsRequest- Returns:
 - the Maven API version being referenced or 
nullif unknown 
 
 -