java - Maven Findbugs plugin - How to run findbug on the test classes - Stack Overflow
In the configuration of the findbugs-maven-plugin, you need to explicitely set the includeTests element to true for FindBugs to analyze the test classes:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>3.0.1</version> <configuration> <!-- rest of configuration --> <includeTests>true</includeTests> </configuration> </plugin> Also, the plugin should be bound to the verify phase so that FindBugs is executed after compilation of source and test classes.
For the maven-pmd-plugin, it is actually the same: the element includeTests must be set to true in the plugin configuration.
Read full article from java - Maven Findbugs plugin - How to run findbug on the test classes - Stack Overflow
No comments:
Post a Comment