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