[英]findbugs-maven-plugin doesn't do anything
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 ): 我不明白这一点。我希望能够在一个Maven 3项目现场FindBugs的报告,并通过添加这对我的pom.xml(如上所述做到了这里 ):
<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. 然后我运行了mvn site
但没有生成报告。 Interesting thing is when I use version 2.3.1 instead then a report is generated. 有趣的是,当我使用版本2.3.1而不是生成报告时。 But 2.3.2 or 2.4.0 doesn't work. 但是2.3.2或2.4.0不起作用。 When running mvn site -X
then the relevant output is this: 当运行mvn site -X
,相关的输出是这样的:
[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? 这可以canGenerate
什么? 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. 插件版本2.3.1自动触发编译,但自2.3.2以来不再是这种情况。 So after a mvn clean
I have to run mvn compile site
to get a report. 所以在mvn clean
我必须运行mvn compile site
来获取报告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.