Package org.apache.maven.tools.plugin
Interface PluginToolsRequest
-
- All Known Implementing Classes:
DefaultPluginToolsRequest
public interface PluginToolsRequestRequest that encapsulates all information relevant to the process of extractingMojoDescriptorinstances from metadata for a certain type of mojo.- Since:
- 2.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<org.apache.maven.artifact.Artifact>getDependencies()Returns the list ofArtifactused in class path scanning for annotationsjava.lang.StringgetEncoding()Gets the file encoding of the source files.org.apache.maven.artifact.repository.ArtifactRepositorygetLocal()org.apache.maven.plugin.descriptor.PluginDescriptorgetPluginDescriptor()org.apache.maven.project.MavenProjectgetProject()java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>getRemoteRepos()booleanisSkipErrorNoDescriptorsFound()PluginToolsRequestsetDependencies(java.util.Set<org.apache.maven.artifact.Artifact> dependencies)PluginToolsRequestsetEncoding(java.lang.String encoding)Sets the file encoding of the source files.PluginToolsRequestsetLocal(org.apache.maven.artifact.repository.ArtifactRepository local)PluginToolsRequestsetPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)PluginToolsRequestsetProject(org.apache.maven.project.MavenProject project)PluginToolsRequestsetRemoteRepos(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos)PluginToolsRequestsetSkipErrorNoDescriptorsFound(boolean skipErrorNoDescriptorsFound)By default an exception is throw if no mojo descriptor is found.
-
-
-
Method Detail
-
getProject
org.apache.maven.project.MavenProject getProject()
- Returns:
- Return the current
MavenProjectinstance in use.
-
setProject
PluginToolsRequest setProject(org.apache.maven.project.MavenProject project)
- Parameters:
project- the currentMavenProject- Returns:
- This request.
- See Also:
getProject()
-
getPluginDescriptor
org.apache.maven.plugin.descriptor.PluginDescriptor getPluginDescriptor()
- Returns:
- Return the
PluginDescriptorcurrently 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:
getPluginDescriptor()
-
getEncoding
java.lang.String getEncoding()
Gets the file encoding of the source files.- Returns:
- The file encoding of the source files, never
null.
-
setEncoding
PluginToolsRequest setEncoding(java.lang.String encoding)
Sets the file encoding of the source files.- Parameters:
encoding- The file encoding of the source files, may be empty ornullto use the platform's default encoding.- Returns:
- This request.
-
setSkipErrorNoDescriptorsFound
PluginToolsRequest setSkipErrorNoDescriptorsFound(boolean skipErrorNoDescriptorsFound)
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-trueto skip errors because of not found descriptors- Returns:
- This request.
- Since:
- 3.0
-
isSkipErrorNoDescriptorsFound
boolean isSkipErrorNoDescriptorsFound()
- Returns:
trueif no descriptor found should not cause a failure- Since:
- 3.0
-
getDependencies
java.util.Set<org.apache.maven.artifact.Artifact> getDependencies()
Returns the list ofArtifactused in class path scanning for annotations- Returns:
- the dependencies
- Since:
- 3.0
-
setDependencies
PluginToolsRequest setDependencies(java.util.Set<org.apache.maven.artifact.Artifact> dependencies)
- Parameters:
dependencies- the dependencies- Returns:
- This request.
- Since:
- 3.0
-
getRemoteRepos
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepos()
- Returns:
- the remote repositories
- Since:
- 3.0
-
setRemoteRepos
PluginToolsRequest setRemoteRepos(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos)
- Parameters:
remoteRepos- the remote repositories- Returns:
- This request.
- Since:
- 3.0
-
getLocal
org.apache.maven.artifact.repository.ArtifactRepository getLocal()
- Returns:
- the local artifact repository
- Since:
- 3.0
-
setLocal
PluginToolsRequest setLocal(org.apache.maven.artifact.repository.ArtifactRepository local)
- Parameters:
local- the local repository- Returns:
- This request.
- Since:
- 3.0
-
-