spotbugs-maven-plugin icon indicating copy to clipboard operation
spotbugs-maven-plugin copied to clipboard

Unable to use execution-level configuration

Open jbennett2091 opened this issue 4 years ago • 0 comments

Maven DTD for plugins supports configuration blocks at the "plugin", or within the nested "plugin/executions/execution" block. Typically, you can use either block - plugin configuration applies to all executions. Unfortunately, spotbugs is only using configuration at the plugin level and does not support execution-level configuration.

I would like to do two-passes of spotbugs. One, with failsOnError=true and one with failsOnError=false. I would separate these into different xml files and/or different directories. This would allow me to get a narrow set of issues that break my build (cleaned, and that we do not want to reintroduce), whereas I also get a full set of 'warnings' that I can clean later. (If there is a better way to use Spotbugs for warnings-and-errors, I don't know it).

Maven happily runs spotbugs twice with two execution blocks, but it does not separately configure them. It only utilizes configuration (for fails and filters) supplied at the plugin level, meaning both executions run the same.

jbennett2091 avatar Apr 30 '20 17:04 jbennett2091