从Sonar导入FindBugs配置到Maven [英] Import FindBugs configuration from Sonar to Maven

查看:355
本文介绍了从Sonar导入FindBugs配置到Maven的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Sonar中的FindBugs配置文件作为 Maven FindBugs中的规则集插件?

How can I use a FindBugs configuration file from Sonar as the rule set in the Maven FindBugs plugin?

推荐答案

您可以将文件(即findbugs-sonar.xml)放置在src/main/resource文件夹中,并在Maven报告设置中指定路径,如下所示:

You can place your file, i.e. findbugs-sonar.xml in the src/main/resource folder and specify the path in your maven reporting settings like this:

<reporting>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <version>2.5.3-SNAPSHOT</version>
            <configuration>
                <includeFilterFile>findbugs-sonar.xml</includeFilterFile>
            </configuration>
        </plugin>
    </plugins>
</reporting>

这篇关于从Sonar导入FindBugs配置到Maven的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆