FindBugs Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID findbugs Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
4.56
Mar 10, 2014
1.424
analysis-core (version:1.55)
dashboard-view (version:2.2, optional)
maven-plugin (version:1.424, optional)
token-macro (version:1.5.1, optional)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Ulli Hafner (id: drulli)
Usage Installations 2013-Apr 7679
2013-May 7701
2013-Jun 7785
2013-Jul 8121
2013-Aug 7950
2013-Sep 8127
2013-Oct 8306
2013-Nov 8214
2013-Dec 8181
2014-Jan 8565
2014-Feb 8760
2014-Mar 9059

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

Installation Requirements
This plug-in requires the utility plug-in "analysis-core" (called "Static Analysis Utilities" in the update manager). Please ensure that the latest version of this plug-in is also installed.

It's about 5 years now since my first Jenkins commit. I hope that you all enjoy using my static code analysis plug-ins and that these plug-ins are very helpful for your projects! There is now an easy way to support the development of these open source plug-ins I just released my Android game Inca Trails. So feel free to support my work for Jenkins by buying this game in Google Play. Of course, the game is worth its price anyway

Description

This plug-in is supported by the Static Analysis Collector plug-in that collects different analysis results and shows the results in aggregated trend graphs. Additionally, health reporting and build stability is also based on the aggregated results.

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 or from the third-party plug-ins Find Security Bugs or fb-contrib
  • 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 (activated on goal findbugs:findbugs or site)
  • Remote API to export the build quality and found warnings
  • Several tokens to simplify post processing of the results
  • Localization available for: DE, JA (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 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

You can support the development of this open source plug-in by buying my Android game Inca Trails in Google Play!

Release 4.56

  • Tried to fix some class loading problems with dom4j (issue #21256)

Release 4.51

  • Added a view column that shows the number of warnings in a job

Release 4.50

  • Make dependency to ant-plugin optional

Release 4.49

  • Fixed detection of warnings category in custom rules (thanks to Jesse Glick for the patch!)
  • Added some more fields that are exposed via the REST API (issue #17767, thanks to Mihail Menev, Johann Vierthaler for the patch!)
  • Added Traditional Chinese translations (thanks to Pei-Tang Huang!)
  • Added system configuration option to disable console logging of all static analysis plug-ins (issue #15246, thanks to Sebastian Seidl for the patch!)
  • Added system configuration option to fail a build when one of the static analysis plug-ins fails parsing its input (issue #17663, thanks to Mihail Menev and Johann Vierthaler for the patch)
  • Fixed broken encoding handling in maven jobs (issue #17657, thanks to André Lehmann!)

Release 4.48

Release 4.47

Release 4.46

  • Upgraded bug pattern messages to FindBugs 2.0.2
  • Added messages of FindBugs Security Bugs Plug-in
  • Show more details in the fixed warnings view (issue #15959)
  • Aggregate the maven parent module results in failed builds when the failure is caused by a threshold being hit (issue #15324, issue #12342)
  • Optimized http requests for static resources in the analysis plugins (issue #16571)
  • Fixed missing build overview in maven jobs (issue #16518)
  • Always use Xerces when parsing XML files (issue #15613)
  • Read pom.xml to obtain path of output files in maven jobs (issue #16250)
  • Show error message as file content if the source files could not be transferred to the master (issue #16222)

Release 4.45

  • Added option to consider only stable builds when calculating new warnings (Thanks to David Pärsson for the patch, issue #15037)
  • Fixed NPE when comparing warnings (issue #15414, issue #15250)
  • Fixed CPE due to conflicting versions of dom4j (issue #15344)

Release 4.44

Release 4.43

Release 4.42

  • Reduce memory footprint of plug-in (thanks to Kohsuke for the patches)
  • Upgrade to YUI 2.9 (support for new bread crumbs and context menus: issue #13532, thanks to OHTAKE Tomohiro for the patch)

Release 4.41

  • Show all values of difference graph

Release 4.40

  • Added hyperlinks to build summary if threshold is exceeded (issue #12424)

Release 4.39

  • Added option to filter projects with zero warnings in the warnings dashboard portlet (issue #12984)
  • Center the affected source line in source view (issue #13491)
  • Fixed incompatibility of detail tabs with new bread crumb view (issue #13532)

Release 4.38

  • Added a new portlet that shows the warning totals as a line graph

Release 4.37

  • Fixed another problem when trying to detect the correct findbugs xml file with maven 2 jobs (issue #13090)

Release 4.36

Release 4.35

  • Fixed detection of findbugs results input file

Release 4.34

  • Show build result threshold evaluation information in build summary (issue #12424)
  • Fixed plug-in configuration if used in conjunction with flexible-publisher plug-in (issue #12182, issue #8185)

Release 4.33

  • Upgrade to FindBugs 2.0.0 and fb-contrib 4.6.1 (issue #12314)

Release 4.32

  • Fixed initialization problem when configuring the plug-in for maven jobs. (issue #12075)

Release 4.31

  • Fixed NPE while configuring a graph with no builds yet (issue #12045)
  • Group warnings by relative path if the associated language has no package or namespace concept (issue #11846)
  • Allow skipping of calculating "new" issues (issue #11761)
  • Fixed display of 'Use delta for new warnings' option (issue #11758)
  • Ignore 'new warnings' threshold in the first build (issue #11718)

Release 4.30

  • Fixed enlarge link for trend graphs (issue #11324)
  • Fixed visibility of 'enable trend graph' link
  • Fixed reading of results if analysis is invoked during 'mvn site' (issue #10820)

Release 4.29

  • Ignore failed builds when evaluating the build history in trend graphs and new warnings calculation (issue #10682)
  • Added OSGi bundle detection when grouping warnings by module (issue #10681)
  • Use the path as a replacement for the package grouping for all warnings that are not from Java or C# files (issue 2)

Release 4.28

  • Added new tokens for token macro plug-in (issue #10027): now tokens FINDBUGS_NEW, FINDBUGS_FIXED, FINDBUGS_COUNT and FINDBUGS_RESULT are available.

Release 4.27

Release 4.26

Release 4.25

  • Fixed display of trend graphs for maven jobs (report)

Release 4.24

  • Fixed health reporting and build failure/unstable thresholds for maven project type (issue #4912, issue #3514)
  • Fixed broken detail views when using a reverse proxy (issue #3410, thanks to Benjamin Cabé for the fix)
  • Show the reference build that is used to compute new and fixed warnings (when build thresholds are set)
  • Improved logging statements when build is executed on a slave

Release 4.23

  • Added configuration option to enable automatic project and module name detection by reading all Ant project.xml and Maven pom.xml files (issue #8915, issue #9090)
  • Added preliminary support for the Token Macro Plugin: FINDBUGS_COUNT expands to the number of FindBugs warnings and FINDBUGS_RESULT expands to the plug-in build result (stable, unstable, failed)

Release 4.22

  • Added configuration option to enable automatic project and module name detection by reading all Ant project.xml and Maven pom.xml files (issue #8915, issue #9090)

Release 4.21

  • Fixed missing dependency to Hudson/Jenkins 1.395 (issue #8509)

Release 4.20

  • Jenkins update to links and documentation
  • Show progress text while dashboard portlet graphs are created

Release 4.19

  • Added support for multi-configuration projects (issue #6772)

Release 4.18

  • Fixed sorting of date labels of dashboard trend graphs (issue #8476)
  • Fixed evaluation of builds that will be considered in the dashboard trend graph (issue #8283)
  • Don't show FindBugs cloud information if the project is not registered in the cloud (issue #8236)
  • Fixed wrong computation of the number of bugs that are new this week (issue #8235)

Release 4.16

Release 4.15

Release 4.14

Release 4.13

  • Now uses Bug Rank to compute issue priority, a more accurate and modern method of determining seriousness of a bug
  • Added build status thresholds for each warning priority (issue #3561)
  • Fixed warnings parsing if the SAX parser system property has been set to an illegal value (issue #7312)
  • Added support for FindBugs Cloud
    • Bug details contain Cloud review info
    • Bugs marked as "Not a bug" are hidden from Hudson

Release 4.12

  • Fixed computation of module names for maven projects (issue #6768)
  • Don't report an error message if a maven module does not contain a report file (issue #6895)
  • Fixed ant links (issue #6862)

Release 4.11

Release 4.10

  • Reduced number of false positives when computing new and fixed warnings (issue #6669)

Release 4.9

Release 4.8

  • Fixed broken links to project page and overview image (issue #6417)

Release 4.7

  • Added trend graph portlets for the dashboard view
  • Added option to start the plug-in even for failed builds (issue #6117)
  • Added 'enlarge' link for trend graphs that shows a detail page with the graph
  • Fixed ordering of warnings in detail views (issue #6132)
  • Fixed warning distribution graph in files detail view (issue #6139)

Release 4.5

Release 4.4

  • New warnings computation is now based on the current build and the reference build (i.e., the last successful build, see issue #5147)
  • Visualized plug-in build status (based on the healthiness thresholds)
  • Added high scores for successful builds
  • Don't show project action if there are no warnings (issue #5473)
  • Don't show trend graph configuration on job creation (issue #5294)
  • Improved remote API, now the warning keys are also exposed (issue #5195)

Release 4.3

  • Fixed class loading problems due to a duplicate Apache bcel library in the classpath (issue #5134)

Release 4.2

  • Added support for the new plug-in [Static Analysis Collector plug-in] to provide combined trend graphs and health reporting (issue #3320)
  • Improved remote API, now the warnings are also exposed (issue #5195)

Release 4.1

  • Fixed trend report link if there are no results available yet (issue #5156)
  • Fixed preview of trend reports
  • Added dependency to Hudson 1.337 due to a class loader bug in previous versions (issue #4993)

Release 4.0

  • Extracted common code of the static code analysis plug-ins into a new utility plug-in "analysis-core"
  • Several bug fixes and small improvements

Release 1.x - 3.x ChangeLog

How To Use

1.    Install plugin, Manage Hudson> manage plugins >Available
2.    Restart app server/ Hudson
3.    Update pom.xml, add in a plugin in the reporting section

<project>

....

<reporting>

  <plugins>
     <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>findbugs-maven-plugin</artifactId>
           <version>2.5.2</version>
           <configuration>
              <findbugsXmlOutput>true</findbugsXmlOutput>
              <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
              <xmlOutput>true</xmlOutput>
           </configuration>
        </plugin>

        ....

   </plugins>

  ....

</reporting>

...

</project>

4. In job configure go to build > goals and options, and add "findbugs:findbugs"

5. In the job definition you should now also have a "Publish FindBugs analysis results" checkbox under Build Settings, turn it on.
 

Labels

plugin-maven plugin-maven Delete
plugin-report plugin-report Delete
supports-dashboard-view supports-dashboard-view Delete
token-producer token-producer Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. 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 

  2. 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 

  3. Dec 07, 2007

    Anonymous says:

    Tahnks a lot Ulli.   That worked. I have downloaded several Plugins. All h...

    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

  4. Dec 14, 2007

    Anonymous says:

    Hello,  does this work with maven2 project type or is it just for free sty...

    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

  5. 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

  6. 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.

     The same with me. Installed plugin but does not seem to be activated in Hudson GUI. Any hint ?

     does this work with maven2 project type or is it just for free style? I cannot find any options in maven2 project.


    ~ Mike 

  7. Dec 30, 2007

    Stephen Connolly says:

    This plugin does not currently work with the m2 project type

    This plugin does not currently work with the m2 project type

  8. Jan 15, 2008

    Anonymous says:

    Hi, I'm getting a double tool tip when I mouse over the highlighted text. Has a...

    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

    1. 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 

  9. Jan 18, 2008

    Anonymous says:

    Hi, I have some problem with running plugin (version 1.18) on my XML file gener...

    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

    1. 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

  10. Mar 06, 2008

    greinhart - says:

    specify **/findbugsXml.xml See issue 1369

    specify **/findbugsXml.xml

    See issue 1369

  11. 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 ...

    1. 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.

  12. 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.

  13. Oct 12, 2009

    Dan Morrow says:

    Non-admin users cannot view the code. I just install the FindBugs plugins for H...

    Non-admin users cannot view the code.

    I just install the FindBugs plugins for Hudson, and it works great. The reports it generates are very useful to me and my team.

    There is one small issue though. In the "Details" view, where it lists each warning (with file-name, line number, and problem) it shows a link to the file-name only for me, the Hudson admin. For all of my colleagues, it doesn't show the link to "MyBadFile.java". This is unfortunate, because that is such a great view, showing the line in the context of the file.

    I do manage the permissions of users logging into Hudson. My permissions, as the admin, are different from everyone else using Hudson. And I don't want to change it. But the rest of the team has pretty broad permissions. The permissions that are turned off for them are "overall:administer", "slave:configure" "slave:delete" and "job:release". I don't know why any of these permissions would prevent them from seeing the source view here. But if you have any ideas, I'd be grateful.

    Thanks for any help you could provide.

    -Dan.

    1. Oct 13, 2009

      Ulli Hafner says:

      That has been fixed already in trunk and will be part of the next release. Then ...

      That has been fixed already in trunk and will be part of the next release. Then all users with "Workspace" Permission will be able to view the source code.

      1. Nov 06, 2009

        Dan Morrow says:

        Trying not to be pushy, but will the next release be out soon?

        Trying not to be pushy, but will the next release be out soon?

  14. Nov 25, 2009

    Daniel Parnitzke says:

    I got problems with this plugin. Following situation: native m2 project using...

    I got problems with this plugin. Following situation:

    • native m2 project
    • using Maven 2.0.9 and Findbugs-Hudson-Plugin v3.8
    • Added findbugs mojo as plugin to project pom as advised above:

                  <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>findbugs-maven-plugin</artifactId>
                      <version>2.2</version>
                      <configuration>
                          <findbugsXmlOutput>true</findbugsXmlOutput>
                          <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
                          <xmlOutput>true</xmlOutput>
                      </configuration>
                  </plugin>

    • added goal findbugs:findbugs to build
    • enabled release of findbugs results in hudsons project properties

    A local call of mvn clean findbugs:findbugs works just fine, produces target/findbugs.xml and target/findbugsXml.xml. However, the build in hudson fails with

    ...
    [TASKS] Scipping maven reporter: there is already a result available.
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to configure plugin parameters for: org.codehaus.mojo:findbugs-maven-plugin:2.2
    Cause: Cannot find setter nor field in org.codehaus.mojo.findbugs.FindBugsMojo for 'findbugsXmlWithMessages'
    ...

    Any suggestions?

    1. Nov 25, 2009

      Daniel Parnitzke says:

      Tried some more and now it works. What did I do? Disabled publishing of FindBu...

      Tried some more and now it works. What did I do?

      • Disabled publishing of FindBugs reports in project settings (but kept goal findbugs:findbugs)
      • Build project -> OK
      • Enabled publishing again
      • Build project -> OK and I have my reports

      Is it only me, how find that strange? And ideas on how to avoid this (as I most likely will have to set up more maven based project in the future)?

      1. Dec 27, 2009

        Ulli Hafner says:

        This bug has been fixed in release 4.0.

        This bug has been fixed in release 4.0.

  15. Jan 11, 2010

    dtriphaus - says:

    Hi, i get the following error using the 4.1 and the findbugs-maven-plugin 2.3 (h...

    Hi, i get the following error using the 4.1 and the findbugs-maven-plugin 2.3 (hudson 1.339):

    [INFO] [findbugs:findbugs execution: default]
    [java] Warnings generated: 2
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] null
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    java.lang.NullPointerException
    at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.hashCode(RemoteClassLoader.java:419)
    at java.util.HashMap.get(HashMap.java:300)
    at hudson.remoting.ExportTable.export(ExportTable.java:155)
    at hudson.remoting.Channel.export(Channel.java:468)
    at hudson.remoting.RemoteClassLoader.exportId(RemoteClassLoader.java:341)
    at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:373)
    at sun.reflect.GeneratedMethodAccessor1315.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
    at hudson.remoting.Request$2.run(Request.java:270)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

    Is there any chance to get this working? The build is working when it's run from the console and if the findbugs hudson plugin is deactivated.

    EDIT: It seems to be container-related (tomcat), if i run hudson via webstart (standalone) the findbugs-analysis works from a hudson build.

    1. Jan 11, 2010

      dtriphaus - says:

      I found the reason for this. The problem is caused by a xalan.jar placed in tomc...

      I found the reason for this. The problem is caused by a xalan.jar placed in tomcats common directory (in this case common/endorsed).

  16. Feb 01, 2010

    He Tangjun says:

    I use Hudson ver. 1.343 and findbug plugin 4.3. I got the error below, who can h...

    I use Hudson ver. 1.343 and findbug plugin 4.3. I got the error below, who can help me ? Thank you for any idea.

    [FINDBUGS] Collecting findbugs analysis files...
    [FINDBUGS] Parsing of file D:\Development Kit\Hudson\jobs\scs\workspace\trunk\target\findbugs\findbugs.xml failed due to an exception:
    org.dom4j.DocumentException: Sax error  Nested exception: BugInstance with invalid priority value "Normal"
        at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:291)
        at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263)
        at hudson.plugins.findbugs.parser.NativeFindBugsParser.parse(NativeFindBugsParser.java:129)
        at hudson.plugins.findbugs.parser.NativeFindBugsParser.parse(NativeFindBugsParser.java:69)
        at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:74)
        at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:152)
        at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:131)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:87)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:28)
        at hudson.FilePath.act(FilePath.java:694)
        at hudson.FilePath.act(FilePath.java:676)
        at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:104)
        at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:140)
        at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
        at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
        at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
        at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550)
        at hudson.model.Build$RunnerImpl.post2(Build.java:152)
        at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
        at hudson.model.Run.run(Run.java:1221)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:122)
    Caused by: java.lang.NumberFormatException: For input string: "Normal"
        at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:204)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
        at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:286)
        ... 22 more
    Caused by: java.lang.NumberFormatException: For input string: "Normal"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:201)
        ... 34 more
    Nested exception:
    java.lang.NumberFormatException: For input string: "Normal"
        at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:204)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
        at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:286)
        at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263)
        at hudson.plugins.findbugs.parser.NativeFindBugsParser.parse(NativeFindBugsParser.java:129)
        at hudson.plugins.findbugs.parser.NativeFindBugsParser.parse(NativeFindBugsParser.java:69)
        at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:74)
        at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:152)
        at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:131)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:87)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:28)
        at hudson.FilePath.act(FilePath.java:694)
        at hudson.FilePath.act(FilePath.java:676)
        at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:104)
        at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:140)
        at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
        at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
        at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
        at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550)
        at hudson.model.Build$RunnerImpl.post2(Build.java:152)
        at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
        at hudson.model.Run.run(Run.java:1221)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:122)
    Caused by: java.lang.NumberFormatException: For input string: "Normal"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:201)
        ... 34 more
    [FINDBUGS] Found 0 annotations (0 new, 0 high, 0 normal, 0 low)
    [FINDBUGS] Not changing build status, since no threshold has been exceeded

  17. Feb 05, 2010

    Nabanita Nayak says:

    Hi,     I am using Hudson 1.329 version and findbugs plugin 4.3 ...

    Hi,

        I am using Hudson 1.329 version and findbugs plugin 4.3 version. While trying build my project with findbugs:findbugs option it throws the following error. Can somebody please give me the solution to resolve the issue?

    [FINDBUGS] File encoding has not been set in pom.xml, using platform encoding UTF-8, i.e. build is platform dependent (see <a href="http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding">Maven FAQ</a>).
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Name is null
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    java.lang.NullPointerException: Name is null
    at java.lang.Enum.valueOf(Enum.java:191)
    at hudson.plugins.analysis.util.model.Priority.valueOf(Priority.java:18)
    at hudson.plugins.analysis.core.HealthAwareMavenReporter.getMinimumPriority(HealthAwareMavenReporter.java:397)
    at hudson.plugins.analysis.core.AbstractHealthDescriptor.<init>(AbstractHealthDescriptor.java:42)
    at hudson.plugins.findbugs.FindBugsHealthDescriptor.<init>(FindBugsHealthDescriptor.java:25)
    at hudson.plugins.findbugs.FindBugsResultAction.<init>(FindBugsResultAction.java:36)
    at hudson.plugins.findbugs.MavenFindBugsResultAction.<init>(MavenFindBugsResultAction.java:59)
    at hudson.plugins.findbugs.FindBugsReporter.persistResult(FindBugsReporter.java:127)
    at hudson.plugins.analysis.core.HealthAwareMavenReporter$1.call(HealthAwareMavenReporter.java:157)
    at hudson.plugins.analysis.core.HealthAwareMavenReporter$1.call(HealthAwareMavenReporter.java:155)
    at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:325)
    at sun.reflect.GeneratedMethodAccessor223.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at hudson.model.Executor$1.call(Executor.java:376)
    at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
    at $Proxy21.execute(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
    at hudson.remoting.UserRequest.perform(UserRequest.java:104)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:244)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 minute 9 seconds
    [INFO] Finished at: Fri Feb 05 11:25:00 GMT 2010
    [INFO] Final Memory: 55M/373M
    [INFO] ------------------------------------------------------------------------
    channel stopped

    Thanks

  18. Feb 08, 2010

    Sarita Tripathy says:

    I am seeing the issue, that when I look at a build it says something like 41 new...

    I am seeing the issue, that when I look at a build it says something like 41 new warnings, and 38 fixed warnings, but if I click on the it takes me to a page which contains actually 0 issues, total 0, to high low and all other category fixes 0. In effect the whole build might have only a couple of extra issues in the build, but this seeing so many fixed and new confuses the developers, and they are not sure whats wrong and which one is actually new.

    Is anybody else experiencing this problem ? I am getting same unusual numbers for the Duplicate Code checker, and the Checkstyle always says all warning are new.

    We are on Hudson 1.344,

    Static Analysis Utilities 1.3

    Checkstyle Plug-in 3.2

    Duplicate Code Scanner Plug-in 2.2

    Findbugs Plug-in 4.3

    We are using ant to do the build, and publish the findings to xml files.

  19. May 13, 2010

    czp says:

    Hudson shows that there are 41 warnings in FindBugs result report. But all deta...

    Hudson shows that there are 41 warnings in FindBugs result report. But all details tabs(Categories, Types, Warnings, Details) are empty.

    plugin:
    Static Analysis Utilities 1.8
    FindBugs Plug-in 4.8
    LOG:findbugs:
    [findbugs] Executing findbugs from ant task
    [findbugs] Running FindBugs...
    [findbugs] Warnings generated: 41
    [findbugs] Calculating exit code...
    [findbugs] Setting 'bugs found' flag (1)
    [findbugs] Exit code set to: 1
    [findbugs] Java Result: 1
    [findbugs] Output saved to findbugs_report/findbugs.xml

    BUILD SUCCESSFUL
    Total time: 56 seconds
    [FINDBUGS] Collecting findbugs analysis files...
    [FINDBUGS] Successfully parsed file XXX\findbugs_report\findbugs.xml of module findbugs_report with 41 warnings.
    Recording test results
    Finished: SUCCESS

    Any suggestions?

    Thanks!

  20. Dec 04, 2010

    Alfred Pfeffer says:

    Hi, is it possible to customize the bug ranking for findbugs issues?

    Hi,

    is it possible to customize the bug ranking for findbugs issues?

    1. Dec 15, 2010

      Ulli Hafner says:

      I think that could be done in the findbugs analysis step.

      I think that could be done in the findbugs analysis step.

  21. Nov 24, 2011

    alice liu says:

    hello~~~ Is anyone there? I have a question about findbugs in hudson. the...

    hello~~~

    Is anyone there?

    I have a question about findbugs in hudson. there will show the new and fixed bugs for my project in fingbugs-hudson, but does hudson allow me to assign the 'not a bugs' status in hudson GUI? because I have to see the same report in the next new build, it's a little redundant effort for me...

    Thanks for your help:)

    regards

    alice 

    1. Nov 25, 2011

      Ulli Hafner says:

      This is not possible, see https://issues.jenkins-ci.org/browse/JENKINS-7144.
      1. Nov 28, 2011

        alice liu says:

        hello Ullli Hafner, Thanks for your help:) It seems that we can implement this...

        hello Ullli Hafner,

        Thanks for your help:)

        It seems that we can implement this feature in hudson, but it is a little complex,  right?

        To tell the truth, I don't like to suppress the warnings in source code @@. From hudson GUI, I can see how many false positive issues, and what kinds of them? It helps us to fine tune my rule(both for findbugs rule and our coding standard) rather than let my team member to add suppress strings at random.... 

        Again, many thanks for your help:)

        regards

        alice

  22. Dec 08, 2011

    alice liu says:

    hello Ullli Hafner, I am sorry to trouble you again... I found that we can mo...

    hello Ullli Hafner,

    I am sorry to trouble you again...

    I found that we can modify the findbugs_warning.xml in hudson-findbugs, replace ‘<notAProblem>false</notAProblem>’ with <notAProblem>True</notAProblem>,it would not see this warning in Jenkins UI after the modification. Could we see the "not a problem" issues in Jenkins UI? like 'Fixed issues'? it will report which files in which line and  which pattern are not a problem?
    Thanks for  your help:)

     regards,

    Alice

    1. Jan 20, 2012

      Ulli Hafner says:

      Hallo Alice, I don't understand your question. There is no option to customize ...

      Hallo Alice,

      I don't understand your question. There is no option to customize the UI.

  23. Dec 21, 2011

    podskalsky - says:

    After update to 4.32 (all other plugins and jenkins are up tu date) my jenkins j...

    After update to 4.32 (all other plugins and jenkins are up tu date) my jenkins jobs with findbugs can't be loaded ...

    downgrade to 4.30 helped !

    1. Jan 20, 2012

      Ulli Hafner says:

      Did you also upgrade analysis-core?

      Did you also upgrade analysis-core?

      1. Jan 24, 2012

        podskalsky - says:

        Updated to 4.33 incl latest analysis-core -> no more problems :-)

        Updated to 4.33 incl latest analysis-core -> no more problems :-)

  24. Mar 15, 2012

    Pei-Tang Huang says:

    Seems 4.35 does not like Maven 2.2.3 [INFO] ****** FindBugsMojo execute ******...

    Seems 4.35 does not like Maven 2.2.3

    [INFO] ****** FindBugsMojo execute *******
    [INFO] canGenerate is false
    [JENKINS] Archiving D:\AppData\Jenkins\workspace\bci-analysis\pom.xml to D:\AppData\jenkins\jobs\bci-analysis\modules\bci$bci\builds\2012-03-15_09-43-55\archive\bci\bci\1.0-SNAPSHOT\bci-1.0-SNAPSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] org/apache/maven/plugin/MojoExecution.getVersion()Ljava/lang/String;
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    java.lang.NoSuchMethodError: org/apache/maven/plugin/MojoExecution.getVersion()Ljava/lang/String;
    at hudson.plugins.findbugs.FindBugsReporter.determineFileName(FindBugsReporter.java:191)
    at hudson.plugins.findbugs.FindBugsReporter.perform(FindBugsReporter.java:166)
    at hudson.plugins.analysis.core.HealthAwareReporter.postExecute(HealthAwareReporter.java:304)
    at hudson.maven.Maven2Builder.postExecute(Maven2Builder.java:155)
    at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:310)
    at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170)
    at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)

    1. Mar 15, 2012

      Ulli Hafner says:

      Fixed in 4.36. Thanks for reporting.

      Fixed in 4.36. Thanks for reporting.

  25. Jun 26, 2012

    Vasil Dilchev says:

    Hello Dr. Hafner, First of all, compliments for the great plugin! Reading...

    Hello Dr. Hafner,

    First of all, compliments for the great plugin!

    Reading the changelog, I see the Plugin has support for the FindBugs WebCloud. We have a FindBugs Cloud in our intranet and an appropriate Client as FindBugs plugin. The FindBugs GUI and Eclipse plugin connect successfully to the Cloud. We have also developed another plugin with custom detectors.

    My first question is: is it possible to make it that your Plugin connects to our Cloud in order to read comments and upload new bug instances? Reading the sources and looking at the contents of your Plugin I figure that the FindBugs libraries are somehow nested or packaged (in the library jar) with the Plugin. In that sense there is no "plugin" folder where our Cloud Plugin can be placed so that it can be loaded from FindBugs as it works with the standard distribution. Could you please provide some guidance in how loading our Cloud Plugin can be achieved. Can the Jenkins Plugin be extended to honor a "plugin" folder for FindBugs plugins? This is a feature request if it can be done easily. Or do we have to repackage your plugin from source. Could you please highlight what and how needs to be touched?

    EDIT: Alternatively, will the FindBugs plugins in ~userhome/.findbugs/plugin be loaded by your Jenkins FindBugs Plugin?

    Assuming the cloud plugin can be loaded, how to instruct your Plugin to use it? Will the "Cloud" element of the analysis result XML be honored?

    Last but not least: it is stated on this page that long bug descriptions are loaded from the FindBugs library? What happens if the Bugs are reported by (and defined in) a FindBugs plugin?

    Generally: is it not possible to use an external installation of FindBugs instead of re-packaging the libraries with the plugin?

    1. Jun 26, 2012

      Ulli Hafner says:

      Hi Vasil, actually I don't know what cloud features are available. This feature ...

      Hi Vasil, actually I don't know what cloud features are available. This feature has been added by the findbugs team. I never used that up to now.

      I'm not sure how easy it would be to add custom plug-ins. The problematic thing I see is the class loading: Jenkins uses a specific class loader for each plug-in. I don't know if that works out for the findbugs library. Are you interested to dig into that issue? (The reason that I'm repackaging findbugs is to use a different asm version, Jenkins contains a conflicting version)

      1. Jun 26, 2012

        Vasil Dilchev says:

        Hello Dr. Hafner, and thank you for the quick reply. I am working on the issue, ...

        Hello Dr. Hafner, and thank you for the quick reply. I am working on the issue, but unfortunately I won't be able to stay too long on it.

        I already found out that FindBugs plugins are loaded from ~<jenkins-user-home>/.findbugs/plugin, so at least this problem is kind of solved. Obviously the ClassLoader is not causing any trouble (I think FindBugs once loaded itself uses its own ClassLoader to load the plugins).

        It is still not working for me though, as I have built a slightly modified webCloudClient from the trunk sources of FindBugs in order to tweak the method of user authentication (the original plugin is tied to an OpenID authentication through a browser). So when the Jenkins Plugin tries to use the Client, I get an exception because the interface of some imported classes has obviously changed in version 2.0.1-rc2 of FindBugs. Here the ISOWebCloudClient is a replacement for WebCloudClient, but the function throwing the exception is actually unchanged:

        Stracktrace
        FATAL: edu.umd.cs.findbugs.cloud.Cloud$SigninState.canDownload()Z
        java.lang.NoSuchMethodError: edu.umd.cs.findbugs.cloud.Cloud$SigninState.canDownload()Z
        	at edu.umd.cs.findbugs.cloud.appEngine.ISOWebCloudClient.isInCloud(ISOWebCloudClient.java:609)
        	at hudson.plugins.findbugs.parser.FindBugsParser.setCloudInformation(FindBugsParser.java:289)
        	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:232)
        	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:143)
        	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:103)
        	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:358)
        	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:317)
        	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:266)
        	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
        	at hudson.FilePath.act(FilePath.java:842)
        	at hudson.FilePath.act(FilePath.java:824)
        	at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:156)
        	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338)
        	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
        	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
        	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692)
        	at hudson.model.Build$BuildExecution.post2(Build.java:183)
        	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
        	at hudson.model.Run.execute(Run.java:1513)
        	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        	at hudson.model.ResourceController.execute(ResourceController.java:88)
        	at hudson.model.Executor.run(Executor.java:236)

        Do you plan on upgrading to FindBugs 2.0.1 in the near future (I know it is still a rc, but it seems quite stable)? Or could you point me to what I need to change to repackage it myself from source?

        Thank you!

        1. Jun 26, 2012

          Ulli Hafner says:

          I will upgrade as soon as 2.0.1 is available. You can repackage if you change th...

          I will upgrade as soon as 2.0.1 is available. You can repackage if you change the findbugs version in the library subfolder of my plug-in (and in the pom of the plugin).

          1. Jun 27, 2012

            Vasil Dilchev says:

            Thank you for the info. I managed to get it working without modifying the Jenkin...

            Thank you for the info. I managed to get it working without modifying the Jenkins Plugin (rewrote the failing function in WebCloudClient).

            I can confirm that the issues get uploaded to the Cloud and also that the long descriptions and correct bug ranks are loaded for our plugin.

            Nevertheless, the bug classifications and reviews are not loaded from the Cloud because of:

            // In FindBugsParser:289
            
            // FIXME: This method has been removed in findbugs 2.0.0
            // bug.setDetailsUrlTemplate(cloud.getBugDetailsUrlTemplate());

            I will open a new issue in Jira to discuss a possible solution... maybe I can provide a patch.

            Cheers!

            1. Jun 27, 2012

              Ulli Hafner says:

              Thanks, that would be fine. I already sent a mail to the findbugs mailing list q...

              Thanks, that would be fine. I already sent a mail to the findbugs mailing list quite some time ago, but got no answer yet.

  26. Jul 11, 2012

    lninname says:

    is it possible to configure findbugs plugin for jenkins to suppress few warnings...

    is it possible to configure findbugs plugin for jenkins to suppress few warnings?

    1. Jul 12, 2012

      Ulli Hafner says:

      Warning suppressions need to be configured in your build step that actually call...

      Warning suppressions need to be configured in your build step that actually calls findbugs, e.g. using a suppression filter.

  27. Feb 22, 2013

    Eduardo Dias says:

    Hi I am trying to capture FindBugs "new" and "fixed" warnings to send by email u...

    Hi I am trying to capture FindBugs "new" and "fixed" warnings to send by email using jelly template, but the output is always empty. I have gogooled and all tips didn´t work.

    Please could you help me to identify the correct method that I need to use? The plugin release is 4.45 and Jenkins is 1.494.

    Thanks. 

    Regards

    Eduardo

    1. Feb 23, 2013

      Ulli Hafner says:

      What code are you using so far? Is this a maven job, then you need to wait for h...

      What code are you using so far? Is this a maven job, then you need to wait for https://issues.jenkins-ci.org/browse/JENKINS-15324 to be released...

  28. May 23, 2013

    Bill Parkinson says:

    I am stuck....   I cannot seem to get the plugin to pick up the find b...

    I am stuck....   I cannot seem to get the plugin to pick up the find bugs.

    I have added the following to my pom.xml

    <reporting>
          <plugins>
              <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>findbugs-maven-plugin</artifactId>
               <version>2.5.2</version>
               <configuration>
                  <findbugsXmlOutput>true</findbugsXmlOutput>
                  <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
                  <xmlOutput>true</xmlOutput>
               </configuration>
            </plugin>
          </plugins>
        </reporting>

    I have added the goal findbugs:findbugs to my jenkins maven job.

    findbugs seems to execute when jenkins runs my build:mojoStarted org.codehaus.mojo:findbugs-maven-plugin:2.5.2(default-cli)
    [INFO]
    [INFO] — findbugs-maven-plugin:2.5.2:findbugs (default-cli) @ quest —
    [INFO] Fork Value is true
    [java] Warnings generated: 799
    [INFO] Done FindBugs Analysis....
    mojoSucceeded org.codehaus.mojo:findbugs-maven-plugin:2.5.2(default-cli)
    projectSucceeded com.mlsci:quest:4.7.0-SNAPSHOTI have added "Publish combined analysis results as a Post-Build Action, and FindBugs Warnings is checked.

    I do see a static code analysis graph with the project but all zeros for warnings...

    When I run locally I see findbugsXml.xml   in the target folder...

    Any tips as to what I am missing?

    1. May 24, 2013

      Ulli Hafner says:

      Since you updated the wiki: does it work now? If you use the collector plug-in t...

      Since you updated the wiki: does it work now? If you use the collector plug-in then you need to activate the findbugs plug-in in your configuration of your job...

  29. Mar 10

    Srikanth Tirukovalluru says:

    Hi, I could able to configure findbugs plugin and could able to also view the r...

    Hi,

    I could able to configure findbugs plugin and could able to also view the results in Jenkins UI. Is there a way to send the Jenkins findbugs results in a mail?

    Thank you,

    Srikanth.T

    1. Mar 11

      Ulli Hafner says:

      You can use the email ext plug-in to send information about found bugs. There is...

      You can use the email ext plug-in to send information about found bugs. There is an example in the Wiki.