org.apache.maven.tools.plugin
Class DefaultPluginToolsRequest

java.lang.Object
  extended by org.apache.maven.tools.plugin.DefaultPluginToolsRequest
All Implemented Interfaces:
PluginToolsRequest

public class DefaultPluginToolsRequest
extends Object
implements 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
DefaultPluginToolsRequest(MavenProject project, PluginDescriptor pluginDescriptor)
           
 
Method Summary
 Set<Artifact> getDependencies()
          Returns the list of Artifact used in class path scanning for annotations
 String getEncoding()
          Gets the file encoding of the source files.
 ArtifactRepository getLocal()
           
 PluginDescriptor getPluginDescriptor()
          Return the PluginDescriptor currently being populated as part of the build of the current plugin project.
 MavenProject getProject()
          Return the current MavenProject instance in use.
 List<ArtifactRepository> getRemoteRepos()
           
 boolean isSkipErrorNoDescriptorsFound()
          
 PluginToolsRequest setDependencies(Set<Artifact> dependencies)
           
 PluginToolsRequest setEncoding(String encoding)
          Sets the file encoding of the source files.
 PluginToolsRequest setLocal(ArtifactRepository local)
           
 PluginToolsRequest setPluginDescriptor(PluginDescriptor pluginDescriptor)
          
 PluginToolsRequest setProject(MavenProject project)
          
 PluginToolsRequest setRemoteRepos(List<ArtifactRepository> remoteRepos)
           
 PluginToolsRequest setSkipErrorNoDescriptorsFound(boolean skipErrorNoDescriptorsFound)
          By default an exception is throw if no mojo descriptor is found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPluginToolsRequest

public DefaultPluginToolsRequest(MavenProject project,
                                 PluginDescriptor pluginDescriptor)
Method Detail

getPluginDescriptor

public PluginDescriptor getPluginDescriptor()
Return the PluginDescriptor currently being populated as part of the build of the current plugin project.

Specified by:
getPluginDescriptor in interface PluginToolsRequest

setPluginDescriptor

public PluginToolsRequest setPluginDescriptor(PluginDescriptor pluginDescriptor)

Specified by:
setPluginDescriptor in interface PluginToolsRequest
See Also:
PluginToolsRequest.getPluginDescriptor()

getProject

public MavenProject getProject()
Return the current MavenProject instance in use.

Specified by:
getProject in interface PluginToolsRequest

setProject

public PluginToolsRequest setProject(MavenProject project)

Specified by:
setProject in interface PluginToolsRequest
See Also:
PluginToolsRequest.getProject()

getEncoding

public String getEncoding()
Gets the file encoding of the source files.

Specified by:
getEncoding in interface PluginToolsRequest
Returns:
The file encoding of the source files, never null.

setEncoding

public PluginToolsRequest setEncoding(String encoding)
Sets the file encoding of the source files.

Specified by:
setEncoding in interface PluginToolsRequest
Parameters:
encoding - The file encoding of the source files, may be empty or null to use the platform's default encoding.
Returns:
This request.

isSkipErrorNoDescriptorsFound

public boolean isSkipErrorNoDescriptorsFound()

Specified by:
isSkipErrorNoDescriptorsFound in interface PluginToolsRequest
Returns:

setSkipErrorNoDescriptorsFound

public 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

Specified by:
setSkipErrorNoDescriptorsFound in interface PluginToolsRequest

getDependencies

public Set<Artifact> getDependencies()
Description copied from interface: PluginToolsRequest
Returns the list of Artifact used in class path scanning for annotations

Specified by:
getDependencies in interface PluginToolsRequest
Returns:

setDependencies

public PluginToolsRequest setDependencies(Set<Artifact> dependencies)
Specified by:
setDependencies in interface PluginToolsRequest
Returns:

getRemoteRepos

public List<ArtifactRepository> getRemoteRepos()
Specified by:
getRemoteRepos in interface PluginToolsRequest
Returns:

setRemoteRepos

public PluginToolsRequest setRemoteRepos(List<ArtifactRepository> remoteRepos)
Specified by:
setRemoteRepos in interface PluginToolsRequest
Returns:

getLocal

public ArtifactRepository getLocal()
Specified by:
getLocal in interface PluginToolsRequest
Returns:

setLocal

public PluginToolsRequest setLocal(ArtifactRepository local)
Specified by:
setLocal in interface PluginToolsRequest
Returns:


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.