Interface LifecycleProvider
- All Superinterfaces:
ExtensibleEnumProvider<Lifecycle>
,SpiService
- All Known Implementing Classes:
DefaultLifecycleRegistry.LifecycleWrapperProvider
@Experimental
@Consumer
@Named
public interface LifecycleProvider
extends ExtensibleEnumProvider<Lifecycle>
Service provider interface for registering custom
Lifecycle
implementations.
This interface allows plugins and extensions to define and register additional build lifecycles beyond the standard ones provided by Maven (like clean, default, site). Lifecycles define a sequence of phases that can be executed during a build.
Implementations of this interface will be discovered through the Java ServiceLoader mechanism and their provided lifecycles will be available throughout the Maven build process.
Example usage:
public class CustomLifecycleProvider implements LifecycleProvider { public Collection<Lifecycle> provides() { return Collections.singleton( lifecycle("deploy-docker", Arrays.asList( "build-image", "tag-image", "push-image" )) ); } }
- Since:
- 4.0.0
- See Also:
-
Method Summary
Methods inherited from interface org.apache.maven.api.spi.ExtensibleEnumProvider
provides