Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import FindBugs configuration from Sonar to Maven

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

like image 921
cremersstijn Avatar asked Oct 21 '13 19:10

cremersstijn


1 Answers

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>
like image 99
Martin Seeler Avatar answered Oct 01 '22 17:10

Martin Seeler