How to force compile error with aspectJ pointcut mismatch
问题 I have the following aspectJ pointcut: @Around(value="execution(* *(*,Map<String, Object>)) && @annotation(com.xxx.annotations.MyCustomAnnotation)") As you can see, this pointcut only matches methods, annotated with com.xxx.annotations.MyCustomAnnotation, which have 2 arguments - the first one is arbitrary and the second one must be of type Map<String, Object> . Is there a way to configure the aspectj-maven-plugin to force compilation errors if it find methods that are annotated with com.xxx