Findbugs: UnionBugs Ant Task

When building an ant project with many subprojects, I like to run find bugs on each of them independently. However there isn’t (wasn’t till now) a good way to merge all the bug reports into a single file.

Define the task:

<taskdef name="UnionBugs" classname="edu.umd.cs.findbugs.anttask.UnionBugs">


<unionbugs to="${testreports.dir}/findbugs.xml">
    <fileset dir="${plugin.basedir}">
  	<include name="**/*_findbugsparts.xml">

Download: findbugs-ant-merge.jar

This has been contributed and included in findbugs version 1.3.6-rc3 available at