Class PluginStub
java.lang.Object
org.apache.maven.api.plugin.testing.stubs.PluginStub
- All Implemented Interfaces:
Plugin
A stub implementation of
Plugin
for testing Maven plugins.
Provides a lightweight plugin context that can be configured with models,
descriptors, lifecycles, and dependencies needed for testing.
This stub is commonly used in conjunction with MojoExecutionStub
to create a complete testing environment for plugin executions.
Example usage:
PluginStub plugin = new PluginStub(); plugin.setDescriptor(pluginDescriptor); plugin.setModel(pluginModel);
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetModel()
void
setArtifact
(Artifact artifact) void
setClassLoader
(ClassLoader classLoader) void
setDependencies
(List<Dependency> dependencies) void
setDependenciesMap
(Map<String, Dependency> dependenciesMap) void
setDescriptor
(PluginDescriptor descriptor) void
setLifecycles
(List<Lifecycle> lifecycles) void
-
Constructor Details
-
PluginStub
public PluginStub()
-
-
Method Details
-
getModel
-
setModel
-
getDescriptor
- Specified by:
getDescriptor
in interfacePlugin
-
setDescriptor
-
getLifecycles
- Specified by:
getLifecycles
in interfacePlugin
-
setLifecycles
-
getClassLoader
- Specified by:
getClassLoader
in interfacePlugin
-
setClassLoader
-
getArtifact
- Specified by:
getArtifact
in interfacePlugin
-
setArtifact
-
getDependencies
- Specified by:
getDependencies
in interfacePlugin
-
setDependencies
-
getDependenciesMap
- Specified by:
getDependenciesMap
in interfacePlugin
-
setDependenciesMap
-