I would like to use a custom annotation in my project.
How can I configure maven 3 to process my annotation. The annotation and the implementation of the AbstractProcessor class are embedded in my application.
My annotation is available only for testing (src/test/java).
State annotation :
@Target(ElementType.METHOD)
public @interface State {
boolean success() default true;
}
TestAnnotationsProcessor :
@SupportedAnnotationTypes("com.*****.client.State")
public class TestAnnotationsProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
System.out.print("TESSST ANNOTATION");
return true;
}
}
I don't want to put my annotation in an external project... it will be stupid because it's really dependend of my project.
How can I do that ? Thanks.