archiecobbs opened a new issue, #1051:
URL: https://github.com/apache/maven-compiler-plugin/issues/1051

   ### New feature, improvement proposal
   
   Setting `<failOnWarning>true</failOnWarning>`, which simply adds the 
`-Werror` flag, is documented as "Indicates whether the build will continue 
even if there are compilation warnings", which is accurate.
   
   However, it would be nice if there were a version of this setting that 
implemented a slightly different behavior: "Indicates whether the build will 
**fail** if there are compilation warnings".
   
   In other words, sometimes you want the build to fail if there are any 
warnings but you also want the compiler to spit out ALL of those warnings 
before it stops (i.e., complete the entire compilation process regardless) so 
you can deal with them all at once, instead of warning-by-warning.
   
   That's not the behavior that `-Werror` provides; instead it is "fail fast" 
literally treating warnings like errors. Instead this proposed new option would 
only work when the plugin is using the `javax.tools` API (because there is no 
equivalent javac command line flag) and it would use a `DiagnosticListener` to 
track if there were warnings generated, etc.
   
   But this would be a nice feature, perhaps call it 
`<failAfterWarning>true</failAfterWarning>` or somesuch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to