【问题标题】:Import FindBugs configuration from Sonar to Maven将 FindBugs 配置从 Sonar 导入 Maven
【发布时间】:2013-10-30 10:22:40
【问题描述】:

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

【问题讨论】:

  • 请注意,较新的 SonarQube 版本不再依赖 FindBugs。

标签: java maven sonarqube findbugs


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2011-12-30
    • 2014-03-16
    • 1970-01-01
    • 1970-01-01
    • 2014-02-20
    • 1970-01-01
    • 2014-10-24
    • 2011-08-02
    • 2012-08-08
    相关资源
    最近更新 更多