I am having some trouble getting the Findbugs XML report processor working as needed. Essentially, what I want to do is to get TeamCity Findbugs reporting to line up with our Ant command line build.
We are using Findbugs 2.0.0 and we have an include.xml file outlining the bugs that we want to check for and an exclude.xml outlining the exclusions to our global bug checking.
The include.xml file looks something like:
And the exclude.xml file looks something like:
<!-- See http://findbugs.sourceforge.net/manual/filter.html for how to extend this file -->
<!-- Ignore generated tmf classes -->
Now, I have added an XML report processing build feature to my Ant build in TeamCity and configured things as follows:
Report Type - FindBugs
FindBugs home path - <absolute path to FindBugs installation> eg. /export/home/teamcity/findbugs-2.0.0
+|-:<path to file>/findbugs-include-filters.xml
+|-:<path to file>/findbugs-exclude-filters.xml
Note - I have omitted the "path to file" above for simplicity.
I was a little unclear as to the syntax of the monitoring rules section. I wasn't sure if things should be +: for include and -: for exlcude. I have tried various combinations and nothing seems to work.
My Build Log file produces the following:
[15:34:44]: FindBugs report watcher
[15:34:44]: [FindBugs report watcher] 1 report found for paths:
[15:34:44]: [FindBugs report watcher] artifacts/findbugs/Aggregate-Findbugs-Report.xml
[15:34:44]: [FindBugs report watcher] +|-:<path to file>/findbugs-include-filters.xml
[15:34:44]: [FindBugs report watcher] +|-:<path to file>/findbugs-exclude-filters.xml
[15:34:44]: [FindBugs report watcher] Successfully parsed
[15:34:44]: [Successfully parsed] 1 report
[15:34:44]: [Successfully parsed] artifacts/findbugs/Aggregate-Findbugs-Report.xml
[15:34:44]: Publishing internal artifacts
[15:34:45]: [Publishing internal artifacts] Sending build.finish.properties file
[15:34:44]: Publishing artifacts (2s)
[15:34:44]: [Publishing artifacts] Paths to publish: [artifacts]
[15:34:45]: [Publishing artifacts] Sending files
[15:34:48]: Build finished
[15:34:48]: Total: 1594 (+0 -0) Errors: 194 (+0 -0)
At the end of the day, the number of Errors does not match the number of Priority 1 issues in the XML report and the total is out of sync as well.
I am running TeamCity 6.5.3 (build 17985).
Any guidance or help would be appreciated.