[ http://jira.codehaus.org/browse/MCOMPILER-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228789#action_228789 ]
David Boden commented on MCOMPILER-66: -------------------------------------- Adding <showWarnings>true</showWarnings> to my compiler plugin <configuration/> results in: * The Kind.NOTE print statements being output as [ERROR] * Without the showWarnings, the statements don't get printed. * The build fails (it succeeds when showWarnings=false), probably because the NOTE messages have been artificially raised to ERROR level and Maven is interpreting this as a build failure? I'm using: <artifactId>maven-compiler-plugin</artifactId> <version>2.3.1</version> I'm building this project: http://immutablebean.googlecode.com/svn/ImmutableBeanExample Hopefully you'll be able to check out this project, build it and change the <showWarnings/> to recreate this error at will. Here's the output I get with showWarnings=true: [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] \Users\Dave\workspace\ImmutableBeanExample\src\main\java\org\immutablebean\beantemplates\BeanInterfaceTemplate.java:[14,21] Note: Identified bean property: identifier [ERROR] \Users\Dave\workspace\ImmutableBeanExample\src\main\java\org\immutablebean\beantemplates\BeanInterfaceTemplate.java:[15,18] Note: Identified bean property: version [ERROR] \Users\Dave\workspace\ImmutableBeanExample\src\main\java\org\immutablebean\beantemplates\BeanInterfaceTemplate.java:[16,6] Note: Identified bean property: creationDate [ERROR] \Users\Dave\workspace\ImmutableBeanExample\src\main\java\org\immutablebean\beantemplates\BeanInterfaceTemplate.java:[17,12] Note: Identified bean property: price [ERROR] \Users\Dave\workspace\ImmutableBeanExample\src\main\java\org\immutablebean\beantemplates\BeanInterfaceTemplate.java:[18,12] Note: Identified bean property: quantity > Compiler swallows messages from annotation processors > ----------------------------------------------------- > > Key: MCOMPILER-66 > URL: http://jira.codehaus.org/browse/MCOMPILER-66 > Project: Maven 2.x Compiler Plugin > Issue Type: Bug > Affects Versions: 2.0.2, 2.1 > Reporter: Evan Cowden > Attachments: AnnotationProcessorMessagerBug.zip > > > When using the annotation processor API to print messages through the > javax.annotation.processing.Messager object, only messagesspecified by levels > javax.tools.Diagnostic.Kind.ERROR and > javax.tools.Diagnostic.Kind.MANDATORY_WARNING are displayed (and cause the > build to fail). All other messages are swallowed. > Note that while the attached JUnit test case is necessary to help expose the > problem, passing it will not imply that the bug is fixed. The only way to > confirm the fix (that I know of) is to examine console output. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira