Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnostics from annotation processors do not map correctly to maven logging #54

Closed
GoogleCodeExporter opened this issue Mar 18, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

It seems that all annotation processor messages are treated as debug output, 
regardless of Diagnostic.Kind. I would expect Java 6 annotation processing 
diagnostic messages to map to Maven logging as follows:

ERROR -> error (or at least warning)
MANDATORY_WARNING -> warning
NOTE -> debug
OTHER -> info or debug
WARNING -> warning

Instead, all diagnostic messages map to debugging. This means that without 
maven debugging, all we get is:

[ERROR] error on execute: error during compilation
...
Failed to execute goal org.bsc.maven:maven-processor-plugin:2.2.3:process 
(process) on project esp-domain-api: Error executing: error during compilation 
-> [Help 1]

There is no diagnostic information. Since an annotation processor diagnostic 
error fails the build anyway, we might as well output the cause. Also, the 
annotation processors are often the first to detect issues in project code 
(even with an IDE, during a clean installation). 

Resolving bad input to an annotation processor currently requires 'debugging 
the build', which is very verbose.

What steps will reproduce the problem?
1. Reporting an error from using the annotation processing environment's 
message, from an annotation processor. For example: 
'processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "OOPS!");'
2. Run maven without -X. Error diagnostic is not provided
3. Run maven with -X. Error is shown like this: "[DEBUG] diagnostic error 
<<message>>", but so is a lot of irrelevant Maven debug output

What version of the product are you using? On what operating system?
Plugin version 2.2.3. OS version Windows 8.

Original issue reported on code.google.com by [email protected] on 11 Jun 2013 at 11:15

@GoogleCodeExporter
Copy link
Author

Hi

Thx for feedbacks

I'll check code following your suggestions

Original comment by [email protected] on 12 Jun 2013 at 10:15

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 14 Jun 2013 at 7:33

  • Added labels: Milestone-Release2.2.4

@GoogleCodeExporter
Copy link
Author

i've deployed 2.2.4-SNAPSHOT with fix 

soon i'll deploy new release

Original comment by [email protected] on 14 Jun 2013 at 7:48

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

deployed version 2.2.4

Original comment by [email protected] on 14 Jun 2013 at 9:07

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Great! I'll give it a try on our project and will feedback soon

Original comment by [email protected] on 17 Jun 2013 at 8:02

@GoogleCodeExporter
Copy link
Author

Works like a charm! Thx for the great plugin

Original comment by [email protected] on 17 Jun 2013 at 8:18

@GoogleCodeExporter
Copy link
Author

Thank you too for help me to continue improve sw

Original comment by [email protected] on 17 Jun 2013 at 12:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant