My goal is to fail our build if there is new Finbugs error introduced into the code base and having the email reflects number of new errors that findbugs plugin found.
These are the options that are selected for the Finbugs plugin:
- Run always
- Compute new warnings (based on reference build)
- Use delta for new warnings
- Only use stable builds as reference
- Status thresholds (New warnings): All priorities set to 0
As a test, after a first run, the job passed since it's first ever run and no new findbugs errors found. The email showed Findbugs statistics just fine.
Then I intentionally checked in a Findbugs error to the one of my source class, the build ran and failed this time because Findbugs plugin saw the new warning threshold of 0 has been breached. Here is where the bug I filed came in: the email content of Findbugs statistics are all 0's (used to be empty strings). So you know that your build failed but you don't know that it failed because Findbugs found new errors. This email is quite vague to a developer.
Also, this bug only exposes when you use a Maven style job. A freestyle job generates the right content in the email when the build failed due to Findbugs.
Can you please clarify your expectations? Did you enable the flag to run findbugs for failed builds, too? Maybe this flag needs to be clarified when used in conjunction with maven projects...