Package org.apache.maven.api.model
Class PluginExecution
java.lang.Object
org.apache.maven.api.model.ConfigurationContainer
org.apache.maven.api.model.PluginExecution
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class PluginExecution
extends ConfigurationContainer
implements Serializable, InputLocationTracker
The
<execution> element contains informations required for the
execution of a plugin.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create PluginExecution instances. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetGoals()The goals to execute with the given configuration.getId()The identifier of this execution for labelling the goals during the build, and for matching executions to merge during inheritance and profile injection.getPhase()The build lifecycle phase to bind the goals in this execution to.intThe priority of this execution compared to other executions which are bound to the same phase.static PluginExecution.BuilderCreates a newPluginExecutionbuilder instance.static PluginExecution.BuildernewBuilder(boolean withDefaults) Creates a newPluginExecutionbuilder instance using default values or not.static PluginExecution.BuildernewBuilder(PluginExecution from) Creates a newPluginExecutionbuilder instance using the specified object as a basis.static PluginExecution.BuildernewBuilder(PluginExecution from, boolean forceCopy) Creates a newPluginExecutionbuilder instance using the specified object as a basis.static PluginExecutionCreates a newPluginExecutioninstance.static PluginExecutionnewInstance(boolean withDefaults) Creates a newPluginExecutioninstance using default values or not.toString()with()Creates a new builder with this object as the basis.withConfiguration(XmlNode configuration) Creates a newPluginExecutioninstance using the specified configuration.withGoals(Collection<String> goals) Creates a newPluginExecutioninstance using the specified goals.Creates a newPluginExecutioninstance using the specified id.withInherited(String inherited) Creates a newPluginExecutioninstance using the specified inherited.Creates a newPluginExecutioninstance using the specified phase.withPriority(int priority) Creates a newPluginExecutioninstance using the specified priority.Methods inherited from class org.apache.maven.api.model.ConfigurationContainer
getConfiguration, getInherited, getLocation, isInherited, newBuilder, newBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.maven.api.model.InputLocationTracker
getLocation
-
Field Details
-
DEFAULT_EXECUTION_ID
- See Also:
-
-
Method Details
-
getId
The identifier of this execution for labelling the goals during the build, and for matching executions to merge during inheritance and profile injection.- Returns:
- a
String
-
getPhase
The build lifecycle phase to bind the goals in this execution to. If omitted, the goals will be bound to the default phase specified by the plugin.- Returns:
- a
String
-
getPriority
public int getPriority()The priority of this execution compared to other executions which are bound to the same phase. Executions derived from the default lifecycle have a negative priority by default so that they are executed before any custom plugin executions.
Since: Maven 4.0.0- Returns:
- a
int
-
getGoals
The goals to execute with the given configuration.- Returns:
- a
List<String>
-
with
Creates a new builder with this object as the basis.- Overrides:
within classConfigurationContainer- Returns:
- a
Builder
-
withInherited
Creates a newPluginExecutioninstance using the specified inherited.- Overrides:
withInheritedin classConfigurationContainer- Parameters:
inherited- the newStringto use- Returns:
- a
PluginExecutionwith the specified inherited
-
withConfiguration
Creates a newPluginExecutioninstance using the specified configuration.- Overrides:
withConfigurationin classConfigurationContainer- Parameters:
configuration- the newXmlNodeto use- Returns:
- a
PluginExecutionwith the specified configuration
-
withId
Creates a newPluginExecutioninstance using the specified id.- Parameters:
id- the newStringto use- Returns:
- a
PluginExecutionwith the specified id
-
withPhase
Creates a newPluginExecutioninstance using the specified phase.- Parameters:
phase- the newStringto use- Returns:
- a
PluginExecutionwith the specified phase
-
withPriority
Creates a newPluginExecutioninstance using the specified priority.- Parameters:
priority- the newintto use- Returns:
- a
PluginExecutionwith the specified priority
-
withGoals
Creates a newPluginExecutioninstance using the specified goals.- Parameters:
goals- the newCollection<String>to use- Returns:
- a
PluginExecutionwith the specified goals
-
newInstance
Creates a newPluginExecutioninstance. Equivalent tonewInstance(true).- Returns:
- a new
PluginExecution - See Also:
-
newInstance
Creates a newPluginExecutioninstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
PluginExecution
-
newBuilder
Creates a newPluginExecutionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newPluginExecutionbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newPluginExecutionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- thePluginExecutioninstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newPluginExecutionbuilder instance using the specified object as a basis.- Parameters:
from- thePluginExecutioninstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
toString
-