I have an APT processor that display warnings on some conditions.
My project is using a maven1 build calling ant:apt
How to make maven fails when warning conditions are met ? (the processor can be modified)
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The annotation processor needs to create a message of Kind
ERROR. This results in a Compilation Failure, which in turn will abort the ant build (unless thefailonerrorparameter of the ant javac task is set tofalse). (And this in turn should fail the maven task)(Acquire the ProcessingEnvironment through the processor’s init method)
Reference: