I managed to run findbugs within my maven build process, and I also have findbugs configured in eclipse. However when running in Eclipse and Maven I get different bugs, and I can't seem to find a setting, where the number of bugs matches in Eclipse and Maven.
My Maven settings is like this:
<version>2.5.2</version>
<configuration>
<failOnError>false</failOnError>
<threshold>Normal</threshold>
<effort>Default</effort>
<xmlOutput>true</xmlOutput>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
</configuration>
And in Eclipse I have:
Findbugs Version: 2.0.1
Analysis Effort: Default
Minimum Rank to report: 20
Minimum Confidence to Report: Medium
Reported categories: All
With those settings, I get more bugs in Eclipse. My main problem is, that I can't even match the different settings between maven and eclipse.
You could try using m2e-code-quality, which includes an m2eclipse 'connector' that should ensure your Eclipse FindBugs configuration matches the configuration specified in your pom.
I'm having exactly the same problem. There is a mismatch between settings available in Eclipse (using FindBugs 2.0.1) and the Maven plugin (version 2.5.2). One setting that is missing from the Maven plugin is 'confidence'. Using another piece of software to match the configurations doesn't address the issue because the Eclipse matching just highlights a problem. I want certain bugs reported from the Maven build completely independently of Eclipse that aren't being reported. It just happens that it is possible to have them reported in Eclipse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With