Java 在多模块maven项目中使用自定义SpotBugs插件
我已经为maven创建了一个定制的SpotBugs插件,如多模块maven项目中所述。但我不知道怎么用它。这方面的文档或示例确实不多 如前所述,我使用了spotbug的Java 在多模块maven项目中使用自定义SpotBugs插件,java,maven,spotbugs,Java,Maven,Spotbugs,我已经为maven创建了一个定制的SpotBugs插件,如多模块maven项目中所述。但我不知道怎么用它。这方面的文档或示例确实不多 如前所述,我使用了spotbug的pluginList和plugins配置属性。但是当我运行spotbug:spotbug时,它不会报告错误。报告了其他错误。知道问题出在哪里吗 我在maven中使用Spotbugs,如下所示: <reporting> <plugins> <plugin&
pluginList
和plugins
配置属性。但是当我运行spotbug:spotbug
时,它不会报告错误。报告了其他错误。知道问题出在哪里吗
我在maven中使用Spotbugs,如下所示:
<reporting>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.plugin.version}</version>
<configuration>
<pluginList>custom-spotbugs.jar</pluginList>
<plugins>
<plugin>
<groupId>com.example</groupId>
<artifactId>custom-spotbugs</artifactId>
<version>${custom.build.version}</version>
</plugin>
</plugins>
</configuration>
</plugin>
</plugins>
</reporting>
com.github.spotbug
spotbugs maven插件
${spotbug.plugin.version}
自定义spotbug.jar
com.example
自定义斑点虫
${custom.build.version}
编辑:我注意到我必须运行
mvn站点
,报告插件才能工作。但下一个问题是配置值无法更改。我在配置中有Max
,即使我删除了它,它仍然被使用。配置是缓存的还是什么?我还有一个构建工具模块,用于共享FindBugsClude xml文件。但我不知道这是否有帮助。我试着将pluginList中的jar文件放在资源文件夹中,但仍然不起作用。