【发布时间】:2012-10-30 09:14:52
【问题描述】:
我设法在我的 maven 构建过程中运行 findbugs,并且我还在 eclipse 中配置了 findbugs。然而,当在 Eclipse 和 Maven 中运行时,我会遇到不同的错误,而且我似乎无法找到一个设置,其中错误的数量与 Eclipse 和 Maven 中的匹配。
我的 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,我不确定这两个实际使用的是哪个版本的 findbugs。
标签: java eclipse maven findbugs