Findbugs和Maven 3.x [英] Findbugs and Maven 3.x

查看:79
本文介绍了Findbugs和Maven 3.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能够获取findbugs 2.3.1、2.3.2-SNAPSHOT或2.4-SNAPSHOT来与Maven 3.x项目一起工作吗?

Has anyone managed to get findbugs 2.3.1, 2.3.2-SNAPSHOT or 2.4-SNAPSHOT to work with a Maven 3.x project?

我总是以:

[错误]无法执行目标 org.codehaus.mojo:findbugs-maven-plugin:2.4-SNAPSHOT:findbugs (cular-db项目上的(default-cli): FindBugs报告中发生错误 报告生成.找不到 符合以下条件的构造函数: org.codehaus.mojo.findbugs.FindbugsReportGenerator(org.codehaus.doxia.module.xhtml.XhtmlSink, java.util.PropertyResourceBundle, java.io.File, org.apache.maven.doxia.tools.DefaultSiteTool)

[ERROR] Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:2.4-SNAPSHOT:findbugs (default-cli) on project cular-db: An error has occurred in FindBugs Report report generation. Could not find matching constructor for: org.codehaus.mojo.findbugs.FindbugsReportGenerator(org.codehaus.doxia.module.xhtml.XhtmlSink, java.util.PropertyResourceBundle, java.io.File, org.apache.maven.doxia.tools.DefaultSiteTool)

我尝试了所有最新的可能版本.我使用findbugs:fingbugs还是仅使用网站目标都没有关系.用

I tried all the latest possible versions. It does not matter if I use findbugs:fingbugs or only the site goal. It is specified with

    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>findbugs-maven-plugin</artifactId>
      <version>${findbugs.version}</version>
      <configuration>
        <threshold>High</threshold>
        <effort>Default</effort>
      </configuration>
    </plugin>

推荐答案

在2011/03/20,发布了Findbugs 2.3.2,并支持Maven 3.

On 2011/03/20, Findbugs 2.3.2 was been released, with Maven 3 support.

公告

发行说明

这意味着您应该能够在Maven 3中使用该插件的最新非快照版本(版本2.3.2或更高版本).

This means that you should be able to use the latest non-snapshot version of the plugin (version 2.3.2 or later) with Maven 3.

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>findbugs-maven-plugin</artifactId>
  <version>2.3.2</version>
</plugin> 

这篇关于Findbugs和Maven 3.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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