Index: src/main/groovy/org/codehaus/mojo/findbugs/FindBugsMojo.groovy =================================================================== --- src/main/groovy/org/codehaus/mojo/findbugs/FindBugsMojo.groovy (revision 16234) +++ src/main/groovy/org/codehaus/mojo/findbugs/FindBugsMojo.groovy (working copy) @@ -311,6 +311,29 @@ String excludeFilterFile /** + *

+ * File name of the baseline file. Bugs found in the baseline file won't be reported. + *

+ * + *

+ * Potential values are a filesystem path, a URL, or a classpath resource. + *

+ * + *

+ * This parameter is resolved as resource, URL, then file. If successfully + * resolved, the contents of the configuration is copied into the + * ${project.build.directory} + * directory before being passed to Findbugs as a filter file. + *

+ * + * This is a comma-delimited list. + * + * @parameter + * @since 2.4.1 + */ + String excludeBugsFile + + /** * Effort of the bug finders. Valid values are Min, Default and Max. * * @parameter default-value="Default" @@ -911,6 +934,16 @@ } } + if ( excludeBugsFile ) { + log.debug(" Adding Exclude Bug Files (Baselines)") + String[] excludeFiles = excludeBugsFile.split(FindBugsInfo.COMMA) + + excludeFiles.each() {excludeFile -> + arg(value: "-excludeBugs") + arg(value: getResourceFile(excludeFile.trim())) + } + } + if ( maxRank ) { arg(value: "-maxRank") arg(value: maxRank)