org.apache.maven.lifecycle.model
Class MojoBinding

java.lang.Object
  extended by org.apache.maven.lifecycle.model.MojoBinding
All Implemented Interfaces:
java.io.Serializable

public class MojoBinding
extends java.lang.Object
implements java.io.Serializable

A binding of one mojo to one lifecycle phase, possibly including configuration.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Field Summary
static java.lang.String DIRECT_INVOCATION_ORIGIN
          origin marker for mojos referenced directly by the user or embedded-mode consumer.
static java.lang.String FORKED_DIRECT_REFERENCE_ORIGIN
          origin marker for single (non-lifecycle) mojos referenced by a forked-execution annotation in another mojo.
static java.lang.String INTERNAL_ORIGIN
          origin marker for mojos injected into the lifecycle by Maven, to manage lifecycle state.
static java.lang.String LIFECYCLE_MAPPING_ORIGIN
          origin marker for mojos bound to the lifecycle by a standard (or default) lifecycle mapping.
static java.lang.String POM_ORIGIN
          origin marker for mojos bound to the lifecycle through POM configuration (not packaging defaults).
 
Constructor Summary
MojoBinding()
           
 
Method Summary
 boolean equals(java.lang.Object other)
          Method equals.
 java.lang.String getArtifactId()
          Get plugin's artifactId.
 java.lang.Object getConfiguration()
          Get mojo binding's configuration.
 java.lang.String getExecutionId()
          Get a name for this mojo binding, for purposes of merging configurations via inheritance, etc.
 java.lang.String getGoal()
          Get mojo's goal name.
 java.lang.String getGroupId()
          Get plugin's groupId.
 java.lang.String getModelEncoding()
           
 java.lang.String getOrigin()
          Return the origin marker set for this MojoBinding, or null.
 java.lang.String getOriginDescription()
          Return specific information about where exactly this binding came from, if it's available.
 Phase getPhase()
          Get the Phase instance to which this MojoBinding is bound.
 java.lang.String getVersion()
          Get plugin's version.
 int hashCode()
          Method hashCode.
 boolean isOptional()
          Get marks a mojo binding as optional (not required for execution of the lifecycle).
 void setArtifactId(java.lang.String artifactId)
          Set plugin's artifactId.
 void setConfiguration(java.lang.Object configuration)
          Set mojo binding's configuration.
 void setExecutionId(java.lang.String executionId)
          Set a name for this mojo binding, for purposes of merging configurations via inheritance, etc.
 void setGoal(java.lang.String goal)
          Set mojo's goal name.
 void setGroupId(java.lang.String groupId)
          Set plugin's groupId.
 void setLifecycleInfo(Phase phase)
          Set the Phase instance to which this MojoBinding is bound.
 void setModelEncoding(java.lang.String modelEncoding)
          Set an encoding used for reading/writing the model.
 void setOptional(boolean optional)
          Set marks a mojo binding as optional (not required for execution of the lifecycle).
 void setOrigin(java.lang.String origin)
           
 void setOriginDescription(java.lang.String originDescription)
           
 void setVersion(java.lang.String version)
          Set plugin's version.
 java.lang.String toString()
          Method toString.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DIRECT_INVOCATION_ORIGIN

public static final java.lang.String DIRECT_INVOCATION_ORIGIN
origin marker for mojos referenced directly by the user or embedded-mode consumer.

See Also:
Constant Field Values

FORKED_DIRECT_REFERENCE_ORIGIN

public static final java.lang.String FORKED_DIRECT_REFERENCE_ORIGIN
origin marker for single (non-lifecycle) mojos referenced by a forked-execution annotation in another mojo.

See Also:
Constant Field Values

POM_ORIGIN

public static final java.lang.String POM_ORIGIN
origin marker for mojos bound to the lifecycle through POM configuration (not packaging defaults).

See Also:
Constant Field Values

LIFECYCLE_MAPPING_ORIGIN

public static final java.lang.String LIFECYCLE_MAPPING_ORIGIN
origin marker for mojos bound to the lifecycle by a standard (or default) lifecycle mapping.

See Also:
Constant Field Values

INTERNAL_ORIGIN

public static final java.lang.String INTERNAL_ORIGIN
origin marker for mojos injected into the lifecycle by Maven, to manage lifecycle state.

See Also:
Constant Field Values
Constructor Detail

MojoBinding

public MojoBinding()
Method Detail

equals

public boolean equals(java.lang.Object other)
Method equals.

Overrides:
equals in class java.lang.Object
Parameters:
other -
Returns:
boolean

getArtifactId

public java.lang.String getArtifactId()
Get plugin's artifactId.

Returns:
String

getConfiguration

public java.lang.Object getConfiguration()
Get mojo binding's configuration.

Returns:
Object

getExecutionId

public java.lang.String getExecutionId()
Get a name for this mojo binding, for purposes of merging configurations via inheritance, etc.

Returns:
String

getGoal

public java.lang.String getGoal()
Get mojo's goal name.

Returns:
String

getGroupId

public java.lang.String getGroupId()
Get plugin's groupId.

Returns:
String

getVersion

public java.lang.String getVersion()
Get plugin's version.

Returns:
String

hashCode

public int hashCode()
Method hashCode.

Overrides:
hashCode in class java.lang.Object
Returns:
int

isOptional

public boolean isOptional()
Get marks a mojo binding as optional (not required for execution of the lifecycle).

Returns:
boolean

setArtifactId

public void setArtifactId(java.lang.String artifactId)
Set plugin's artifactId.

Parameters:
artifactId -

setConfiguration

public void setConfiguration(java.lang.Object configuration)
Set mojo binding's configuration.

Parameters:
configuration -

setExecutionId

public void setExecutionId(java.lang.String executionId)
Set a name for this mojo binding, for purposes of merging configurations via inheritance, etc.

Parameters:
executionId -

setGoal

public void setGoal(java.lang.String goal)
Set mojo's goal name.

Parameters:
goal -

setGroupId

public void setGroupId(java.lang.String groupId)
Set plugin's groupId.

Parameters:
groupId -

setOptional

public void setOptional(boolean optional)
Set marks a mojo binding as optional (not required for execution of the lifecycle).

Parameters:
optional -

setVersion

public void setVersion(java.lang.String version)
Set plugin's version.

Parameters:
version -

toString

public java.lang.String toString()
Method toString.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

getOrigin

public java.lang.String getOrigin()
Return the origin marker set for this MojoBinding, or null. This will give a general idea of where this binding came from.


setOrigin

public void setOrigin(java.lang.String origin)

getOriginDescription

public java.lang.String getOriginDescription()
Return specific information about where exactly this binding came from, if it's available. This might be used to record the specific forking mojo or the lifecycle overlay name that included this mojo, for instance.


setOriginDescription

public void setOriginDescription(java.lang.String originDescription)

getPhase

public Phase getPhase()
Get the Phase instance to which this MojoBinding is bound. NOTE: In some cases, the phase name may not be known, or may not exist (as in the case of a direct mojo invocation from the command line or embedder).


setLifecycleInfo

public void setLifecycleInfo(Phase phase)
Set the Phase instance to which this MojoBinding is bound.


setModelEncoding

public void setModelEncoding(java.lang.String modelEncoding)
Set an encoding used for reading/writing the model.

Parameters:
modelEncoding - the encoding used when reading/writing the model.

getModelEncoding

public java.lang.String getModelEncoding()
Returns:
the current encoding used when reading/writing this model.


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.