我設法在我的maven構建過程中運行findbugs,並且我也在eclipse中配置了findbugs。然而,當在Eclipse和Maven中運行時,我得到了不同的錯誤,而且我似乎無法找到一個設置,其中Eclipse和Maven中的錯誤數量相匹配。在Maven和Eclipse中獲取相同的Findbugs錯誤
我Maven的設置是這樣的:
<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>
而且在Eclipse中我有:
Findbugs Version: 2.0.1
Analysis Effort: Default
Minimum Rank to report: 20
Minimum Confidence to Report: Medium
Reported categories: All
使用這些設置,我得到了Eclipse的更多的錯誤。我的主要問題是,我甚至無法匹配maven和eclipse之間的不同設置。
它們是否都使用相同版本的FindBugs? Maven將從pom文件中派生版本,但Eclipse將取決於您安裝的內容。另外,哪一個產生更多的錯誤? –
我編輯帖子回答你的問題,但我不確定版本...... 2.5.2是findbugs-MavenPlugin的版本,而2.0.1是findbugs-EclipsePlugin的版本, m不知道這兩個實際使用的findbugs版本。 –