我有一个遗留的 maven 项目,并希望集成FindBugs继任者SpotBugs以创建所有问题的报告,但如果仅存在高优先级问题(目前)则失败。
很容易只创建报告而不会失败或在特定阈值上失败。但是,当指定阈值时,所有低于该阈值的问题也会从报告中删除。
我试图根据文档配置插件但没有成功:
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.3</version>
<configuration>
<effort>Max</effort>
<threshold>High</threshold>
<xmlOutput>true</xmlOutput>
<spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs-reports</spotbugsXmlOutputDirectory>
<xmlOutputDirectory>${project.build.directory}/spotbugs-reports</xmlOutputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
我正在使用 Maven 3 和 SpotBugs 3.1.3。