public class DefaultPluginToolsRequest extends Object implements PluginToolsRequest
PluginToolsRequest
, which is used to pass parameters to components used to extract
MojoDescriptor
instances from different types of metadata
for a given plugin.Constructor and Description |
---|
DefaultPluginToolsRequest(org.apache.maven.project.MavenProject project,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) |
Modifier and Type | Method and Description |
---|---|
Set<org.apache.maven.artifact.Artifact> |
getDependencies()
Returns the list of
Artifact used in class path scanning for annotations |
String |
getEncoding()
Gets the file encoding of the source files.
|
List<URI> |
getExternalJavadocBaseUrls() |
URI |
getInternalJavadocBaseUrl() |
String |
getInternalJavadocVersion() |
org.apache.maven.plugin.descriptor.PluginDescriptor |
getPluginDescriptor() |
org.apache.maven.project.MavenProject |
getProject() |
org.eclipse.aether.RepositorySystemSession |
getRepoSession()
Return a Repository Session
|
String |
getRequiredJavaVersion() |
org.apache.maven.settings.Settings |
getSettings() |
String |
getUsedMavenApiVersion() |
boolean |
isSkipErrorNoDescriptorsFound() |
PluginToolsRequest |
setDependencies(Set<org.apache.maven.artifact.Artifact> dependencies) |
PluginToolsRequest |
setEncoding(String encoding)
Sets the file encoding of the source files.
|
PluginToolsRequest |
setExternalJavadocBaseUrls(List<URI> javadocLinks) |
PluginToolsRequest |
setInternalJavadocBaseUrl(URI baseUrl) |
PluginToolsRequest |
setInternalJavadocVersion(String javadocVersion) |
PluginToolsRequest |
setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) |
PluginToolsRequest |
setProject(org.apache.maven.project.MavenProject project) |
void |
setRepoSession(org.eclipse.aether.RepositorySystemSession repoSession)
Set a Repository Session
|
PluginToolsRequest |
setRequiredJavaVersion(String requiredJavaVersion) |
PluginToolsRequest |
setSettings(org.apache.maven.settings.Settings settings) |
PluginToolsRequest |
setSkipErrorNoDescriptorsFound(boolean skipErrorNoDescriptorsFound)
By default an exception is throw if no mojo descriptor is found.
|
PluginToolsRequest |
setUsedMavenApiVersion(String mavenApiVersion) |
public DefaultPluginToolsRequest(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
public org.apache.maven.plugin.descriptor.PluginDescriptor getPluginDescriptor()
getPluginDescriptor
in interface PluginToolsRequest
PluginDescriptor
currently being populated as part of the build of the
current plugin project.public PluginToolsRequest setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
setPluginDescriptor
in interface PluginToolsRequest
pluginDescriptor
- the PluginDescriptor
PluginToolsRequest.getPluginDescriptor()
public org.apache.maven.project.MavenProject getProject()
getProject
in interface PluginToolsRequest
MavenProject
instance in use.public PluginToolsRequest setProject(org.apache.maven.project.MavenProject project)
setProject
in interface PluginToolsRequest
project
- the current MavenProject
PluginToolsRequest.getProject()
public String getEncoding()
getEncoding
in interface PluginToolsRequest
null
.public PluginToolsRequest setEncoding(String encoding)
setEncoding
in interface PluginToolsRequest
encoding
- The file encoding of the source files, may be empty or null
to use the platform's
default encoding.public boolean isSkipErrorNoDescriptorsFound()
isSkipErrorNoDescriptorsFound
in interface PluginToolsRequest
true
if no descriptor found should not cause a failurepublic PluginToolsRequest setSkipErrorNoDescriptorsFound(boolean skipErrorNoDescriptorsFound)
setSkipErrorNoDescriptorsFound
in interface PluginToolsRequest
skipErrorNoDescriptorsFound
- true
to skip errors because of not found descriptorspublic Set<org.apache.maven.artifact.Artifact> getDependencies()
PluginToolsRequest
Artifact
used in class path scanning for annotationsgetDependencies
in interface PluginToolsRequest
public PluginToolsRequest setDependencies(Set<org.apache.maven.artifact.Artifact> dependencies)
setDependencies
in interface PluginToolsRequest
dependencies
- the dependenciespublic org.eclipse.aether.RepositorySystemSession getRepoSession()
PluginToolsRequest
getRepoSession
in interface PluginToolsRequest
public void setRepoSession(org.eclipse.aether.RepositorySystemSession repoSession)
PluginToolsRequest
setRepoSession
in interface PluginToolsRequest
repoSession
- a Repository Sessionpublic PluginToolsRequest setInternalJavadocBaseUrl(URI baseUrl)
setInternalJavadocBaseUrl
in interface PluginToolsRequest
baseUrl
- may be relative to the current site's rootpublic URI getInternalJavadocBaseUrl()
getInternalJavadocBaseUrl
in interface PluginToolsRequest
public PluginToolsRequest setInternalJavadocVersion(String javadocVersion)
setInternalJavadocVersion
in interface PluginToolsRequest
public String getInternalJavadocVersion()
getInternalJavadocVersion
in interface PluginToolsRequest
public PluginToolsRequest setExternalJavadocBaseUrls(List<URI> javadocLinks)
setExternalJavadocBaseUrls
in interface PluginToolsRequest
public List<URI> getExternalJavadocBaseUrls()
getExternalJavadocBaseUrls
in interface PluginToolsRequest
public PluginToolsRequest setSettings(org.apache.maven.settings.Settings settings)
setSettings
in interface PluginToolsRequest
settings
- the Maven settingspublic org.apache.maven.settings.Settings getSettings()
getSettings
in interface PluginToolsRequest
public PluginToolsRequest setRequiredJavaVersion(String requiredJavaVersion)
setRequiredJavaVersion
in interface PluginToolsRequest
requiredJavaVersion
- the required Java version for this plugin or null
if unknown.
Must be a value according to semantics of VersionConstraint
.public String getRequiredJavaVersion()
getRequiredJavaVersion
in interface PluginToolsRequest
null
if unknown.
Is a value according to semantics of VersionConstraint
.public PluginToolsRequest setUsedMavenApiVersion(String mavenApiVersion)
setUsedMavenApiVersion
in interface PluginToolsRequest
public String getUsedMavenApiVersion()
getUsedMavenApiVersion
in interface PluginToolsRequest
null
if unknownCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.