3

I'm using the following in my project's pom.xml file. Running a findbugs:check goal still fails on all errors, even when no High priority errors are present. What am I doing wrong?

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
  <execution>
    <id>failing-on-high</id>
    <phase>process-test-resources</phase>
    <goals>
      <goal>check</goal>
    </goals>
    <configuration>
      <threshold>High</threshold>
      <onlyAnalyze>com.example.-</onlyAnalyze>
    </configuration>
  </execution>
</executions>

4

1 回答 1

2

查看文档并在示例代码库上进行尝试,它看起来像findbugs:check目标

如果源代码中存在任何FindBugs 违规,则构建失败。

这似乎不依赖于threshold的值。

另请查看此博客条目,该条目似乎描述了一个相关问题。

于 2012-05-18T09:21:42.363 回答