org.apache.maven.model.PluginExecution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-model Show documentation
Show all versions of maven-model Show documentation
Model for Maven POM (Project Object Model)
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 2.3.0,
// any modifications will be overwritten.
// ==============================================================
package org.apache.maven.model;
/**
*
*
* The <execution>
element contains
* informations required for the
* execution of a plugin.
*
*
*
* @version $Revision$ $Date$
*/
@SuppressWarnings( "all" )
public class PluginExecution
extends ConfigurationContainer
implements java.io.Serializable, java.lang.Cloneable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* The identifier of this execution for labelling the goals
* during the build,
* and for matching executions to merge during
* inheritance and profile injection.
*/
private String id = "default";
/**
* 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.
*/
private String phase;
/**
*
*
* The priority of this execution compared to other
* executions which are bound to the same phase.
* Warning: This is an internal
* utility property that is only public for technical reasons,
* it is not part of the public API. In particular,
* this property can be changed or deleted without prior
* notice.
*
*
*/
private int priority = 0;
/**
* Field goals.
*/
private java.util.List goals;
//-----------/
//- Methods -/
//-----------/
/**
* Method addGoal.
*
* @param string a string object.
*/
public void addGoal( String string )
{
getGoals().add( string );
} //-- void addGoal( String )
/**
* Method clone.
*
* @return PluginExecution
*/
public PluginExecution clone()
{
try
{
PluginExecution copy = (PluginExecution) super.clone();
if ( this.goals != null )
{
copy.goals = new java.util.ArrayList();
copy.goals.addAll( this.goals );
}
return copy;
}
catch ( java.lang.Exception ex )
{
throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
+ " does not support clone()" ).initCause( ex );
}
} //-- PluginExecution clone()
/**
* Method getGoals.
*
* @return List
*/
public java.util.List getGoals()
{
if ( this.goals == null )
{
this.goals = new java.util.ArrayList();
}
return this.goals;
} //-- java.util.List getGoals()
/**
* Get the identifier of this execution for labelling the goals
* during the build,
* and for matching executions to merge during
* inheritance and profile injection.
*
* @return String
*/
public String getId()
{
return this.id;
} //-- String getId()
/**
* Get 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.
*
* @return String
*/
public String getPhase()
{
return this.phase;
} //-- String getPhase()
/**
* Get the priority of this execution compared to other
* executions which are bound to the same phase.
* Warning: This is an internal
* utility property that is only public for technical reasons,
* it is not part of the public API. In particular,
* this property can be changed or deleted without prior
* notice.
*
* @return int
*/
public int getPriority()
{
return this.priority;
} //-- int getPriority()
/**
* Method removeGoal.
*
* @param string a string object.
*/
public void removeGoal( String string )
{
getGoals().remove( string );
} //-- void removeGoal( String )
/**
* Set the goals to execute with the given configuration.
*
* @param goals a goals object.
*/
public void setGoals( java.util.List goals )
{
this.goals = goals;
} //-- void setGoals( java.util.List )
/**
* Set the identifier of this execution for labelling the goals
* during the build,
* and for matching executions to merge during
* inheritance and profile injection.
*
* @param id a id object.
*/
public void setId( String id )
{
this.id = id;
} //-- void setId( String )
/**
* Set 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.
*
* @param phase a phase object.
*/
public void setPhase( String phase )
{
this.phase = phase;
} //-- void setPhase( String )
/**
* Set the priority of this execution compared to other
* executions which are bound to the same phase.
* Warning: This is an internal
* utility property that is only public for technical reasons,
* it is not part of the public API. In particular,
* this property can be changed or deleted without prior
* notice.
*
* @param priority a priority object.
*/
public void setPriority( int priority )
{
this.priority = priority;
} //-- void setPriority( int )
public static final String DEFAULT_EXECUTION_ID = "default";
@Override
public String toString()
{
return getId();
}
}