Class MojoExecutionStub
java.lang.Object
org.apache.maven.api.plugin.testing.stubs.MojoExecutionStub
- All Implemented Interfaces:
MojoExecution
A stub implementation of
MojoExecution for testing Maven plugins.
This class provides a simplified representation of a Mojo execution context,
allowing tests to simulate plugin executions without a full Maven environment.
Example usage:
MojoExecutionStub execution = new MojoExecutionStub("myExecution", "myGoal");
execution.setPlugin(new PluginStub());
execution.setDescriptor(mojoDescriptor);
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMojoExecutionStub(String executionId, String goal) MojoExecutionStub(String executionId, String goal, XmlNode dom) -
Method Summary
Modifier and TypeMethodDescriptiongetGoal()getModel()voidsetDescriptor(MojoDescriptor descriptor) voidvoidsetExecutionId(String executionId) voidvoidsetLifecyclePhase(String lifecyclePhase) voidsetModel(PluginExecution model) void
-
Constructor Details
-
MojoExecutionStub
-
MojoExecutionStub
-
-
Method Details
-
getPlugin
- Specified by:
getPluginin interfaceMojoExecution
-
getModel
- Specified by:
getModelin interfaceMojoExecution
-
getDescriptor
- Specified by:
getDescriptorin interfaceMojoExecution
-
getLifecyclePhase
- Specified by:
getLifecyclePhasein interfaceMojoExecution
-
getExecutionId
- Specified by:
getExecutionIdin interfaceMojoExecution
-
getGoal
- Specified by:
getGoalin interfaceMojoExecution
-
getConfiguration
- Specified by:
getConfigurationin interfaceMojoExecution
-
setExecutionId
-
setGoal
-
setDom
-
setPlugin
-
setModel
-
setDescriptor
-
setLifecyclePhase
-