Import FindBugs configuration from Sonar to Maven

不羁岁月 提交于 2019-12-23 09:30:36

问题


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


回答1:


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>


来源:https://stackoverflow.com/questions/19502775/import-findbugs-configuration-from-sonar-to-maven

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!