I don't get it... I want to enable findbugs report in a Maven 3 project site and did it by adding this to my pom.xml (As described here ):
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.4.0</version>
</plugin>
</plugins>
</reporting>
...
</project>
Then I ran mvn site
but no report is generated. Interesting thing is when I use version 2.3.1 instead then a report is generated. But 2.3.2 or 2.4.0 doesn't work. When running mvn site -X
then the relevant output is this:
[DEBUG] Inside canGenerateReport..... false
[DEBUG] canGenerate is false
[DEBUG] class org.codehaus.mojo.findbugs.FindBugsGui isMavenReport: false
[DEBUG] skip non MavenReport org.codehaus.mojo:findbugs-maven-plugin:2.4.0:gui
What is this canGenerate
stuff? What's going wrong here?
Ah, found the problem. The project must be compiled first. Plugin version 2.3.1 triggered a compile automatically but since 2.3.2 this is no longer the case. So after a mvn clean
I have to run mvn compile site
to get a report.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.