更新时间:2023-09-29 23:20:34
不确定这是否有帮助,这主要是一种解决方法.
Not sure if that helps, it's mostly a workaround.
我有一个类似的案例,我所做的是将配置放在报告"标签(不是报告集)中.在build"标签中,我只放了插件信息和依赖项.配置使用输出 xml 和输出文件夹的默认值.我还添加了过滤掉一些错误的文件:
I have a similar case and what I did was that I placed the configuration in a "reporting" tag (not reportSets). In the "build" tag, I just put the plugin information and the dependencies. The configuration used the default values for the output xml and output folder. I also added file which was filtering out some of the bugs:
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.10</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>3.1.11</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.10</version>
<configuration>
<excludeFilterFile>spotbugs_filter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</reporting>
然后我做了一个
mvn clean install site spotbugs:check
这给了我:
因此,要将其与您的问题联系起来,我想使用这些步骤"您可以得到两份报告,一份有阈值,另一份没有.
So, to link this with your issue, I guess that using these "steps" you can have two reports, one with the threshold and another one without.
这有意义吗?