I'm migrating our old build to the latest and greatest of everything, including Maven 3.0.4, the latest Maven plugins (Findbugs 2.4.0), Jenkins 1.451 and Jenkins Findbugs plugin 4.33
Now, while the Checkstyle and PMD reports are found, the Jenkins Findbugs plugin doesn't see its report.
Here's my log:
[INFO] --- findbugs-maven-plugin:2.4.0:findbugs (default) @ base-impl ---
[INFO] Fork Value is true
[java] Warnings generated: 4
[INFO] Done FindBugs Analysis....
[FINDBUGS] Parsing 1 files in /ige/jenkins/work/jobs/base/workspace/base-impl/target
[FINDBUGS] Successfully parsed file /ige/jenkins/work/jobs/base/workspace/base-impl/target/findbugs.xml of module Implementation of Base Services with 0 warnings.
[FINDBUGS] Ignore new warnings since this is the first valid build
[FINDBUGS] Not changing build status, since no threshold has been exceeded
[FINDBUGS] Computing warning deltas based on reference build #2
The findbugs.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<BugCollection version='2.0.0' threshold='medium' effort='max'><file classname='ch.ipi.esv.base.impl.mgmt.MgmtServiceBean$RunTestsCallable'><BugInstance type='SIC_INNER_SHOULD_BE_STATIC' priority='Normal' category='PERFORMANCE' message='Should ch.ipi.esv.base.impl.mgmt.MgmtServiceBean$RunTestsCallable be a _static_ inner class?' lineNumber='1'/></file><file classname='ch.ipi.esv.base.impl.mgmt.jmx.MailManagementService$SendTestMailCall'><BugInstance type='DM_DEFAULT_ENCODING' priority='High' category='I18N' message='Found reliance on default encoding in ch.ipi.esv.base.impl.mgmt.jmx.MailManagementService$SendTestMailCall.call(): new java.io.PrintStream(OutputStream)' lineNumber='149'/><BugInstance type='DM_DEFAULT_ENCODING' priority='High' category='I18N' message='Found reliance on default encoding in ch.ipi.esv.base.impl.mgmt.jmx.MailManagementService$SendTestMailCall.call(): new java.io.PrintStream(OutputStream)' lineNumber='155'/></file><file classname='ch.ipi.esv.base.persistence.api.entity.BaseClass'><BugInstance type='EQ_UNUSUAL' priority='Normal' category='STYLE' message='ch.ipi.esv.base.persistence.api.entity.BaseClass.equals(Object) is unusual' lineNumber='50'/></file><Error></Error><Project><SrcDir>/ige/jenkins/work/jobs/base/workspace/base-impl/src/main/java</SrcDir><SrcDir>/ige/jenkins/work/jobs/base/workspace/base-impl/src/main/aspect</SrcDir><SrcDir>/ige/jenkins/work/jobs/base/workspace/base-impl/src/main/aspect</SrcDir><SrcDir>/ige/jenkins/work/jobs/base/workspace/base-impl/src/test/java</SrcDir><SrcDir>/ige/jenkins/work/jobs/base/workspace/base-impl/src/test/aspect</SrcDir><SrcDir>/ige/jenkins/work/jobs/base/workspace/base-impl/src/test/aspect</SrcDir></Project></BugCollection>
What am I doing wrong?
Best regards,
Eric
[FINDBUGS] Successfully parsed file /ige/jenkins/work/jobs/base/workspace/base-impl/target/findbugs.xml of module Implementation of Base Services with 0 warnings.
What looks suspicious is the filename, did you use the following options?
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
Normally the filename is findbugsXml.xml when used with maven...
Ulli
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>findbugs</goal>
</goals>
</execution>
</executions>
<configuration>
<xmlOutput>true</xmlOutput>
<effort>Max</effort>
<excludeFilterFile>${build.home}findbugs/findbugs-exclude.xml</excludeFilterFile>
<failOnError>false</failOnError>
<sourceEncoding>${file.encoding}</sourceEncoding>
</configuration>
</plugin>
As for the configuration you mention, according to http://mojo.codehaus.org/findbugs-maven-plugin-2.4.0/findbugs-mojo.html
findbugsXmlOutput is deprecated and defaults to true
findbugsXmlWithMessages doesn't exist
The files I have in my target directory are:
findbugs.xml
findbugs-exclude.xml
findbugsXml.xml
Best regards,
Eric
-----Ursprüngliche Nachricht-----
Von: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] Im Auftrag von Ullrich Hafner
Gesendet: Dienstag, 21. Februar 2012 16:16
An: jenkins...@googlegroups.com
Betreff: Re: Findbugs Plugin doesn't find report
**/findbugsXml.xml
Ulli
Best regards,
Eric
-----Ursprüngliche Nachricht-----
Von: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] Im Auftrag von Ullrich Hafner
Gesendet: Dienstag, 21. Februar 2012 21:53
An: jenkins...@googlegroups.com
Betreff: Re: AW: Findbugs Plugin doesn't find report
Here, Jenkins detects automatically which file is created. Since you did
not specify
<findbugsXmlOutput>true</findbugsXmlOutput>
my plug-in thinks that only the old findbugs.xml file is created. Can
you please add that to your pom and retry?
Also, please file an issue in our Jira. I need to improve the detecting
of the correct file when using findbugs-maven-plugin 2.4.0 .
Ulli
I also filed the issue https://issues.jenkins-ci.org/browse/JENKINS-12853
Best regards,
Eric
-----Ursprüngliche Nachricht-----
Von: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] Im Auftrag von Ullrich Hafner
Gesendet: Mittwoch, 22. Februar 2012 11:34
An: jenkins...@googlegroups.com
Betreff: Re: AW: AW: Findbugs Plugin doesn't find report