Package org.apache.maven.api.di
package org.apache.maven.api.di
A dependency injection framework for Maven that provides JSR-330 style annotations
for managing object lifecycle and dependencies within Maven's build process.
This package provides a set of annotations that control how objects are created, managed and injected throughout Maven's execution lifecycle. The framework is designed to be lightweight yet powerful, supporting various scopes of object lifecycle from singleton instances to mojo-execution-scoped beans.
Key features include:
- Constructor, method, and field injection
- Qualifiers for distinguishing between beans of the same type
- Multiple scopes (Singleton, Session, and MojoExecution)
- Priority-based implementation selection
- Type-safe dependency injection
- Since:
- 4.0.0
-
Annotation InterfacesClassDescriptionMarks a dependency injection point for constructor, method, or field injection.Indicates that the annotated bean has a lifespan limited to a given mojo execution, which means each mojo execution will result in a different instance being injected.Provides a unique identifier for dependencies when multiple implementations of the same type are available.Specifies the priority of a bean implementation when multiple implementations of the same type are available.Marks a method as a provider of beans for dependency injection.Meta-annotation that marks other annotations as qualifier annotations.Meta-annotation that marks other annotations as scope annotations.Indicates that annotated component should be instantiated before session execution starts and discarded after session execution completes.Denotes that a bean should be created as a singleton instance.Explicitly specifies the types that should be used for dependency injection.