Thursday, November 25, 2010

Run FindBugs from your Eclipse RCP headless build

Running FindBugs from Eclipse RCP headless build is pretty much simple:

1. Add the following target to your customTargets.xml (replace "com.yourcompany" with your package/plug-in prefix):







2. Create input filter file (findbugs-filter.xml):


3. Invoke "findbugs" target from the "prePackage" target:


4. Make sure environment variable FINDBUGS_HOME points to the installation of FindBugs.

5. (For Hudson users) Install, and configure FindBugs plug-in to get the fancy "bugs" trend graph :-)