This plugin generates the trend report for FindBugs, an open source program which uses static analysis to look for bugs in Java code.
Description

The FindBugs plug-in scans for findbugs.xml files in the build workspace and reports the number of warnings found. This plug-in is part of the suite of static code analysis plug-ins that are documented on a separate WIKI page.
The following features are provided by this plug-in:
- Configuration of the files to scan after a build.
- Build summary showing the new and fixed warnings of a build
- Several trend reports showing the number of warnings per build
- Overview of the found warnings per module, package, category, or type
- Parsing of Maven pom.xml or Ant build.xml configuration files to obtain the module or project name
- Parsing of Java or C# files to obtain the package or name space name
- Detail reports of the found warnings optionally filtered by severity (or new and fixed)
- Short messages is read from the report file
- Detailed description is read from the FindBugs library
- Colored HTML display of the corresponding source file and warning lines:
- Direct link to the warning line
- Highlighting of single lines as well as line ranges
- Highlighting of multiple line ranges per warning (different color for primary range)
- Tool tip describing the warning message
- Failure threshold to mark a build as unstable
- Configurable project health support
- Support for the findbugs ant task and the maven-findbugs-plugin 1.1.1 and newer
- Works with the freestyle and native m2 build option of Hudson (activated on goal findbugs:findbugs or site)
- Localization available for: DE (Please help to localize findbugs for your locale!)
The current release is available in the download section. This plug-in is developed and maintained by Ullrich Hafner. Please use the Hudson mailing lists or issue tracker to ask questions, create feature request or bug reports, since I don't read the comment section on this page regularly.
Changelog
Release 3.8
- Added new trend graphs and a configuration screen per job or per user.
- Fixed source code linking if the findbugs report is computed by maven's site goal (issue #3511).
Release 3.7
Release 3.5
- Fixed build health reporting and failure thresholds for native m2 builds (issue #3310).
Release 3.4
- Additional build status thresholds: now you can set the build status to unstable or failure if the total number of the number of new warnings exceeds the defined thresholds (issue #2537, issue #3024).
- Improved new warning detection: now warnings are only considered as new if the associated source code context (3 lines of code) differs.
Release 3.3
Release 3.2
- Added validation of file pattern in configuration screen
- Upgrade to FindBugs 1.3.7 (issue #2861)
- Automatically adapt pom.xml file to produce the correct output format (m2 native mode, issue #2714)
Release 3.1
- Fixed priority evaluation radio buttons in configuration screen (issue #2805)
Release 3.0
- Added new configuration entry "default encoding" that is used when the plug-in reads or parses files (issue #1999)
Release 1.x and 2.x ChangeLog
How To Use
1. Install plugin, Manage Hudson> manage plugins >Available
2. Restart app server/ Hudson
3. Update pom.xml, add in plugin section
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
4. In job configure go to build > goals and options, and add "findbugs:findbugs"
Comments (15)
Dec 06, 2007
Anonymous says:
HI, I am trying to install the Findbugs plugin via Hudson GUI and am not ...HI,
I am trying to install the Findbugs plugin via Hudson GUI and am not able to do so.I downloaded the findbugs.zip file, extracted it under a foler findbugs under Hudson/Plugins.
How do I install this plugin?
I have Hudson running on windows.
Thanks
Hans
Dec 06, 2007
Anonymous says:
The plugin is not in ZIP format. You should not try to unzip it. The plugin shou...The plugin is not in ZIP format. You should not try to unzip it. The plugin should download as .hpi file (if not, then the web server is not configured correctly). Try to rename the file from .zip to .hpi.
--
Ulli
Dec 07, 2007
Anonymous says:
Tahnks a lot Ulli. That worked. I have downloaded several Plugins. All ha...Tahnks a lot Ulli.
That worked. I have downloaded several Plugins. All have the extension .zip
I will change the extensions to .hpi and use them
WArm REgards
Hans
Dec 14, 2007
Anonymous says:
Hello, does this work with maven2 project type or is it just for free styl...Hello,
does this work with maven2 project type or is it just for free style? I cannot find any options in maven2 project.
I use:
- hudson v.1.160
- findbugs plugin v.1.18
Dec 18, 2007
Anonymous says:
The same with me. Installed plugin but does not seem to be activated in Hudson G...The same with me. Installed plugin but does not seem to be activated in Hudson GUI. Any hint ?
Thank you,
R
Dec 20, 2007
Anonymous says:
For the record, me too. The same with me. Installed plugin but does not s...For the record, me too.
~ Mike
Dec 30, 2007
Stephen Connolly says:
This plugin does not currently work with the m2 project typeThis plugin does not currently work with the m2 project type
Jan 15, 2008
Anonymous says:
Hi, I'm getting a double tool tip when I mouse over the highlighted text. Has an...Hi,
I'm getting a double tool tip when I mouse over the highlighted text. Has anyone experienced this?
Screen shot
Hudson v1.171
FindBugs v1.18
-> Sandro
Jan 16, 2008
Anonymous says:
UPDATE: The warning descriptions are also doubled; this is the page which ...UPDATE:
The warning descriptions are also doubled; this is the page which has links to the source.
This bug appears in the findbugs plugin v1.18 only. I tried installing v1.17 and the issue went away. When I put v1.18 back in, it came back.
Eagerly awaiting v1.19!
-> Sandro
Jan 18, 2008
Anonymous says:
Hi, I have some problem with running plugin (version 1.18) on my XML file genera...Hi, I have some problem with running plugin (version 1.18) on my XML file generated by FindBugs. I'm getting this NPE: FATAL: Could not parse FindBugs files. Please check if the file pattern is correct and the latest FindBugs scanner is used (i.e., maven-findbugs-plugin >= 1.1.1) java.lang.NullPointerException at org.apache.commons.digester.Digester.createSAXException(Digester.java:2919) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2945) at org.apache.commons.digester.Digester.endElement(Digester.java:1133) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at org.apache.commons.digester.Digester.parse(Digester.java:1666) at hudson.plugins.findbugs.FindBugsCounter.parseNativeFormat(FindBugsCounter.java:162) at hudson.plugins.findbugs.FindBugsCounter.parse(FindBugsCounter.java:74) at hudson.plugins.findbugs.FindBugsCounter.findBugs(FindBugsCounter.java:222) at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:89) at hudson.model.Build$RunnerImpl.performAllBuildStep(Build.java:150) at hudson.model.Build$RunnerImpl.post2(Build.java:137) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:254) at hudson.model.Run.run(Run.java:673) at hudson.model.Build.run(Build.java:102) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:64) Thanks for any suggestions, Mike
Jan 18, 2008
Anonymous says:
\sorry for last post, i had some troubles with javascripts and csss on this page...[sorry for last post, i had some troubles with javascripts and csss on this page, i'll try again:]
Hi, I have some problem with running plugin (version 1.18) on my XML file generated by FindBugs. I'm getting this NPE:FATAL: Could not parse FindBugs files. Please check if the file pattern is correct
and the latest FindBugs scanner is used (i.e., maven-findbugs-plugin >= 1.1.1)
java.lang.NullPointerException
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2919)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2945)
at org.apache.commons.digester.Digester.endElement(Digester.java:1133)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at org.apache.commons.digester.Digester.parse(Digester.java:1666)
at hudson.plugins.findbugs.FindBugsCounter.parseNativeFormat(FindBugsCounter.java:162)
at hudson.plugins.findbugs.FindBugsCounter.parse(FindBugsCounter.java:74)
at hudson.plugins.findbugs.FindBugsCounter.findBugs(FindBugsCounter.java:222)
at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:89)
at hudson.model.Build$RunnerImpl.performAllBuildStep(Build.java:150)
at hudson.model.Build$RunnerImpl.post2(Build.java:137)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:254)
at hudson.model.Run.run(Run.java:673)
at hudson.model.Build.run(Build.java:102)
at hudson.model.ResourceController.execute(ResourceController.java:70)
at hudson.model.Executor.run(Executor.java:64)Thanks for any suggestions,
Mike
Mar 06, 2008
Gerald Reinhart says:
specify \/findbugsXml.xml See issue 1369 https://hudson.dev.java.net/issues/show...specify **/findbugsXml.xml
See issue 1369
Mar 19, 2008
Manik Surtani says:
I just upgraded my Hudson instance (to 1.197) and installed the findbugs plugin ...I just upgraded my Hudson instance (to 1.197) and installed the findbugs plugin (ver 2.2), and all seems to have run well - the findbugs XML file was generated and I'm guessing it was picked up by the plugin - but I can't find any reports on the Hudson UI.
Where would one look to find this? A screen shot on this wiki page would be supremely useful ...
Apr 06, 2008
Ulli Hafner says:
What Information is shown in the log of the build? Which type of build are you u...What Information is shown in the log of the build? Which type of build are you using (m2 or freestyle?)
BTW: Could you please discuss such issues in the mailing lists as I don't regularly check the comments on this page.
May 16, 2008
Lukasz says:
getting "java.lang.NoClassDefFoundError: hudson/util/ChartUtil$NumberOnlyBuildLa...getting "java.lang.NoClassDefFoundError: hudson/util/ChartUtil$NumberOnlyBuildLabel"
when using Hudson 1.215 and 2.6, 2.5 works fine.