com.itemis.maven.plugins.cdi.annotations.MojoInject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdi-plugin-utils Show documentation
Show all versions of cdi-plugin-utils Show documentation
Provides an abstract Mojo that enables CDI-based dependency injection for Maven Plugins.
package com.itemis.maven.plugins.cdi.annotations;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* The CDI injection annotation for use within the Mojo. Currently only usable for parameter injection in producer
* methods
* Note that it is not possible to use {@code @javax.inject.Inject} directly in your Mojo since this would
* trigger Maven's own pseudo CDI implementation. Within all other beans that are managed by CDI you can use
* {@code @Inject} as usual.
*
* @author Stanley Hillner
* @since 1.0.0
*/
@Retention(RUNTIME)
@Target({ METHOD })
public @interface MojoInject {
}