【问题标题】:Findbugs Maven plugin ignores thresholdFindbugs Maven 插件忽略阈值
【发布时间】:2012-05-18 00:29:16
【问题描述】:

我在项目的 pom.xml 文件中使用以下内容。即使不存在高优先级错误,运行findbugs:check 目标仍然会因所有错误而失败。我做错了什么?

<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>

【问题讨论】:

    标签: java maven findbugs pom.xml


    【解决方案1】:

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

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

    这似乎不依赖于threshold 的值。

    另请查看this blog entry,它似乎描述了一个相关问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-14
      • 1970-01-01
      • 2022-08-15
      相关资源
      最近更新 更多