findbugs-maven-plugin不做任何事情 [英] findbugs-maven-plugin doesn't do anything

查看:648
本文介绍了findbugs-maven-plugin不做任何事情的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白...我想在Maven 3项目站点中启用findbugs报告,并通过将其添加到我的pom.xml中来实现(如

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>

然后我运行了mvn site,但是没有生成报告.有趣的是,当我使用2.3.1版时,会生成报告.但是2.3.2或2.4.0不起作用.当运行mvn site -X时,相关的输出是这样的:

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

这是什么canGenerate东西?怎么了?

What is this canGenerate stuff? What's going wrong here?

推荐答案

啊,发现了问题.必须先编译该项目.插件版本2.3.1自动触发了编译,但自2.3.2起,情况已不再如此.因此,在mvn clean之后,我必须运行mvn compile site以获得报告.

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.

这篇关于findbugs-maven-plugin不做任何事情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆