Findbugs report with excluded packages

1,956 views
Skip to first unread message

jhooms...@netscape.net

unread,
Sep 29, 2011, 8:22:26 AM9/29/11
to jenkins...@googlegroups.com
I am using Jenkins findbugs plugin v4.29, now I configured my pom to exclude few packages, but when I run my project which contains configuration
mvn install findbugs:findbugs
 
I am still seeing that findbugs is generating report for excluded packages, I have no idea if this is an issue with findbugs maven plugin or findbugs Jenkins plugin, my pom with finbugs configuration looks like this
 
<plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>findbugs-maven-plugin</artifactId>
                  <version>2.3.1</version>
                  <configuration>
                      <findbugsXmlOutput>true</findbugsXmlOutput>
                      <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
                      <xmlOutput>true</xmlOutput>
                      <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
                      <includeFilterFile>findbugs-include.xml</includeFilterFile>   
                 </configuration>
           </plugin>
 
Any help in this regard will be highly appreciated.
 
Thanks,
Jhoom
 

Christoph Kutzinski

unread,
Sep 29, 2011, 8:44:22 AM9/29/11
to jenkins...@googlegroups.com
Is it working if you call mvn install findbugs:findbugs manually, i.e. from a shell?

If not, we need to see your exclude and include files.


-------- Original-Nachricht --------
> Datum: Thu, 29 Sep 2011 08:22:26 -0400 (EDT)
> Von: jhooms...@netscape.net
> An: jenkins...@googlegroups.com
> Betreff: Findbugs report with excluded packages

Ullrich Hafner

unread,
Sep 29, 2011, 9:17:51 AM9/29/11
to jenkins...@googlegroups.com
The FindBugs Jenkins plug-in does not read the exclude filters specified
in your pom it just renders the results of the maven plug-in. I.e., this
must be a problem in your filter configuration.

Ulli

jhooms...@netscape.net

unread,
Sep 30, 2011, 3:16:06 AM9/30/11
to jenkins...@googlegroups.com
Thanks Ulli, it looks like that there may be problem with exclude filters, once I investigate more I will post my findings.

jhooms...@netscape.net

unread,
Apr 13, 2012, 4:52:54 AM4/13/12
to jenkins...@googlegroups.com
I looked into it and did not found any issue with reports generated by mvn findbugs:findbugs command the html report generated looks good, but the xml reports findbugsXml.xml still shows exculded class and packages.

 
-----Original Message-----
From: Ullrich Hafner <ullrich...@gmail.com>
To: jenkinsci-users <jenkins...@googlegroups.com>
Sent: Thu, Sep 29, 2011 6:48 pm

jhooms...@netscape.net

unread,
Apr 16, 2012, 5:42:51 AM4/16/12
to jenkins...@googlegroups.com
I looked into it and did not found any issue with reports generated by mvn findbugs:findbugs command the html report generated looks good, but the xml reports findbugsXml.xml still shows excluded class and packages under Jenkins Findbugs report, this is strange and I have no idea why and how this is happening, do I need to configure anything more in findbugs plug-in to exclude the packages, I don't think I have to any more configuration in findbugs plugin the exclude list should take care of exclude packages,
Or do I need to put exclude list under each modules rather than using it only in parent pom?
Any help in this regard is highly appreciated.

Ullrich Hafner

unread,
Apr 16, 2012, 10:19:23 AM4/16/12
to jenkins...@googlegroups.com, jhooms...@netscape.net
It's hard to see if your filters are correct if you don't post your filter.

But anyway, if the findbugs.xml does not contain the warnings and findbugsXml.xml does contain the warnings then this seem to be a bug in the maven findbugs plug-in. Which version are you using?

Ulli

jhooms...@netscape.net

unread,
Apr 18, 2012, 5:47:04 AM4/18/12
to ullrich...@gmail.com, jenkins...@googlegroups.com
Hi Ulli,
 
With some investigation I found that if I run maven command with test cases and findbugs report generation through Jenkins
mvn clean install findbugs:findbugs
 
the exclude list does not work and Jenkins findbugs report get generated with exclude list, but if I skip test cases
 
mvn -Dmaven.test.skip  clean install findbugs:findbugs
 
Findbugs report generated by Jenkins findbugs plugin looks pretty ok, but still entire exclusion does not happens like “Bug Patterns” (<Bug pattern="REC_CATCH_EXCEPTION" />) are still visible in findbugs generated report by Jenkins.
Still I have to test with emma report plus findbugs to see after effect
 
I am confused here whats going wrong, I need to generate all three reports in single project so that everything is accessible on single project.
Attaching my findbugs-exclude.xml file for reference.
 
I am using “maven-findbugs-plugin” version 2.3.1
 
Thanks,
findbugs-exclude.zip

jhooms...@netscape.net

unread,
Apr 19, 2012, 4:28:45 AM4/19/12
to ullrich...@gmail.com, jenkin...@googlegroups.com, jenkins...@googlegroups.com
findbugs-exclude.zip

Ullrich Hafner

unread,
Apr 19, 2012, 11:27:22 AM4/19/12
to jenkins...@googlegroups.com
Maybe your pattern is not correct, I'm using the following:

<FindBugsFilter>
  <Match>
      <Bug code="CD" />
      <Class name="~.*" />
  </Match>
  <Match>
      <Class name="~.*Messages" />
  </Match>
  <Match>
      <Bug code="UwF, SIC, NP" />
      <Class name="~.*Test.*" />
  </Match>
  <Match>
      <Bug code="UwF" />
      <Class name="~.*View.*" />
  </Match>
</FindBugsFilter>

jhooms...@netscape.net

unread,
Apr 20, 2012, 6:43:50 AM4/20/12
to jenkins...@googlegroups.com
If pattern is not correct than it should be an issue with html report generation as well, I should have able to see bug patterns in html format findbugs report generation.
I can send you both my html generated report with and without bug patterns, in these reports you can clearly see the difference.
 
There is an issue but unable to nail down the issue here, there are so many users I am the only one who is facing this kind of problem.

Ullrich Hafner

unread,
Apr 20, 2012, 6:46:01 AM4/20/12
to jenkins...@googlegroups.com
Maybe you could try on the findbugs list (however there is not much traffic there...)

Ulli

jhooms...@netscape.net

unread,
Apr 20, 2012, 6:58:00 AM4/20/12
to jenkins...@googlegroups.com
I agree defiantly can give a try on findbugs list as well, but issue is not coming on findbugs direct report, issue is coming when report is visible through findbugs Jenkins plugin.
That’s why I am crying for help in this forum, there are so many users who must be using Jenkins findbugs plugin so the question is for them also are they not seeing this kind of issue in their findbugs report and if not can they help me where I am wrong in generating report, please help.
Reply all
Reply to author
Forward
0 new messages