I'm trying to get Findbugs working with an existing/mature Maven project.
I added the following to the <plugins>
tag in my pom.xml
:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
I then see that the Findbugs plugin runs when you run mvn site
. Since the build invocation for my project is aleady:
mvn clean jacoco:prepare-agent test site jxr:jxr -Dkey1=123 -Dkey2=456 -Denvironment=DEV
...I just run it like I normally do. The build succeeds and I go to my normal site summary in my browser:
No where from here can I find any "Findbugs" reports or anything that mentions Findbugs at all. When I do a grep for Findbugs (grep -rl "findbugs" .
) I do see that many of my ./target/surefire-reports/TEST-*.xml
files have the term "findbugs" mentioned in them.
Worth mentioning that I do not see a target/site/findbugs.html
file after the successful build...
Any ideas as to where I can find HTML Findbugs output under my Site summary (or anywhere else)? Looking for a nice HTML report showing which (if any) Findbugs checks failed.
You should add the FindBugs plugin in the <plugins>
section of the <reporting>
section of your pom.xml
:
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
</plugin>
</plugins>
</reporting>
...
</project>
The question just states <plugins>
, not sure if that could be the issue.