@Experimental @Generated @ThreadSafe @Immutable public class Plugin extends ConfigurationContainer implements Serializable, InputLocationTracker
<plugin>
element contains informations required for a plugin.Modifier and Type | Class and Description |
---|---|
static class |
Plugin.Builder
Builder class used to create Plugin instances.
|
Modifier and Type | Method and Description |
---|---|
static String |
constructKey(String groupId,
String artifactId) |
boolean |
equals(Object other) |
void |
flushExecutionMap()
Reset the
executionMap field to null |
String |
getArtifactId()
The artifact ID of the plugin in the repository.
|
List<Dependency> |
getDependencies()
Additional dependencies that this project needs to introduce to the plugin's
classloader.
|
List<PluginExecution> |
getExecutions()
Multiple specifications of a set of goals to execute during the build
lifecycle, each having (possibly) a different configuration.
|
Map<String,PluginExecution> |
getExecutionsAsMap() |
String |
getExtensions()
Whether to load Maven extensions (such as packaging and type handlers) from
this plugin.
|
String |
getGroupId()
The group ID of the plugin in the repository.
|
String |
getId()
Gets the identifier of the plugin.
|
String |
getKey() |
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
String |
getVersion()
The version (or valid range of versions) of the plugin to be used.
|
int |
hashCode() |
boolean |
isExtensions() |
static Plugin.Builder |
newBuilder()
Creates a new
Plugin builder instance. |
static Plugin.Builder |
newBuilder(boolean withDefaults)
Creates a new
Plugin builder instance using default values or not. |
static Plugin.Builder |
newBuilder(Plugin from)
Creates a new
Plugin builder instance using the specified object as a basis. |
static Plugin.Builder |
newBuilder(Plugin from,
boolean forceCopy)
Creates a new
Plugin builder instance using the specified object as a basis. |
static Plugin |
newInstance()
Creates a new
Plugin instance. |
static Plugin |
newInstance(boolean withDefaults)
Creates a new
Plugin instance using default values or not. |
String |
toString() |
Plugin.Builder |
with()
Creates a new builder with this object as the basis.
|
Plugin |
withArtifactId(String artifactId)
Creates a new
Plugin instance using the specified artifactId. |
Plugin |
withConfiguration(Dom configuration)
Creates a new
Plugin instance using the specified configuration. |
Plugin |
withDependencies(Collection<Dependency> dependencies)
Creates a new
Plugin instance using the specified dependencies. |
Plugin |
withExecutions(Collection<PluginExecution> executions)
Creates a new
Plugin instance using the specified executions. |
Plugin |
withExtensions(String extensions)
Creates a new
Plugin instance using the specified extensions. |
Plugin |
withGroupId(String groupId)
Creates a new
Plugin instance using the specified groupId. |
Plugin |
withInherited(String inherited)
Creates a new
Plugin instance using the specified inherited. |
Plugin |
withVersion(String version)
Creates a new
Plugin instance using the specified version. |
getConfiguration, getInherited, isInherited, newBuilder, newBuilder
public String getGroupId()
String
public String getArtifactId()
String
public String getVersion()
String
public String getExtensions()
String
for technical reasons, the semantic type is actually
Boolean
. Default value is false
.String
@Nonnull public List<PluginExecution> getExecutions()
List<PluginExecution>
@Nonnull public List<Dependency> getDependencies()
List<Dependency>
public InputLocation getLocation(Object key)
getLocation
in interface InputLocationTracker
getLocation
in class ConfigurationContainer
@Nonnull public Plugin.Builder with()
with
in class ConfigurationContainer
Builder
@Nonnull public Plugin withInherited(String inherited)
Plugin
instance using the specified inherited.withInherited
in class ConfigurationContainer
inherited
- the new String
to usePlugin
with the specified inherited@Nonnull public Plugin withConfiguration(Dom configuration)
Plugin
instance using the specified configuration.withConfiguration
in class ConfigurationContainer
configuration
- the new Dom
to usePlugin
with the specified configuration@Nonnull public Plugin withGroupId(String groupId)
Plugin
instance using the specified groupId.groupId
- the new String
to usePlugin
with the specified groupId@Nonnull public Plugin withArtifactId(String artifactId)
Plugin
instance using the specified artifactId.artifactId
- the new String
to usePlugin
with the specified artifactId@Nonnull public Plugin withVersion(String version)
Plugin
instance using the specified version.version
- the new String
to usePlugin
with the specified version@Nonnull public Plugin withExtensions(String extensions)
Plugin
instance using the specified extensions.extensions
- the new String
to usePlugin
with the specified extensions@Nonnull public Plugin withExecutions(Collection<PluginExecution> executions)
Plugin
instance using the specified executions.executions
- the new Collection<PluginExecution>
to usePlugin
with the specified executions@Nonnull public Plugin withDependencies(Collection<Dependency> dependencies)
Plugin
instance using the specified dependencies.dependencies
- the new Collection<Dependency>
to usePlugin
with the specified dependencies@Nonnull public static Plugin newInstance()
Plugin
instance.
Equivalent to newInstance( true )
.Plugin
newInstance(boolean)
@Nonnull public static Plugin newInstance(boolean withDefaults)
Plugin
instance using default values or not.
Equivalent to newBuilder( withDefaults ).build()
.withDefaults
- the boolean indicating whether default values should be usedPlugin
@Nonnull public static Plugin.Builder newBuilder()
Plugin
builder instance.
Equivalent to newBuilder( true )
.Builder
newBuilder(boolean)
@Nonnull public static Plugin.Builder newBuilder(boolean withDefaults)
Plugin
builder instance using default values or not.withDefaults
- the boolean indicating whether default values should be usedBuilder
@Nonnull public static Plugin.Builder newBuilder(Plugin from)
Plugin
builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false )
.from
- the Plugin
instance to use as a basisBuilder
@Nonnull public static Plugin.Builder newBuilder(Plugin from, boolean forceCopy)
Plugin
builder instance using the specified object as a basis.from
- the Plugin
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forcedBuilder
public boolean isExtensions()
public void flushExecutionMap()
executionMap
field to null
public Map<String,PluginExecution> getExecutionsAsMap()
PluginExecution#getId()
as keyPluginExecution.getId()
public String getId()
<groupId>:<artifactId>:<version>
, never null
.public String getKey()
groupId:artifactId
public static String constructKey(String groupId, String artifactId)
groupId
- The group ID of the plugin in the repositoryartifactId
- The artifact ID of the reporting plugin in the repositorygroupId:artifactId
public boolean equals(Object other)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.