gpt4 book ai didi

maven - 生成 Cobertura 覆盖率报告时,Hudson 构建失败并出现 NoClassDefFoundError

转载 作者:行者123 更新时间:2023-12-02 03:49:39 26 4
gpt4 key购买 nike

我在使用 Hudson 和 Maven 生成 Cobertura 报告时遇到问题,我希望这里有人可以提供解决方案。

我可以看到在 hudson 构建我的项目时生成了 cobertura Artifact 。但是当我配置我的 hudson 项目以发布 Cobertura 覆盖率报告时,我看到构建失败并出现以下错误:

Publishing Cobertura coverage report ...
Publishing Cobertura coverage results ...
FATAL: org/jfree/chart/axis/CategoryAxis
java.lang.NoClassDefFoundError: org/jfree/chart/axis/CategoryAxis
at hudson.plugins.cobertura.CoberturaXmlHandler.startDocument(...)

构建输出显示Java版本为1.6.0_38

如果我配置我的项目以便不生成 Cobertura 覆盖率报告,则构建成功。

在 hudson 上安装了以下插件:

  • 查找错误(版本 4.41-h-2)
  • Checkstyle(版本 3.28-h-1)
  • Cobertura(版本 1-6-h-1)
  • 静态分析收集器(版本 1.28-h-1)
  • 静态分析实用程序(版本 1.42-h-1)
  • Maven 3 构建(版本 3.0.0)

使用以下maven命令:

  • 全新安装 findbugs:findbugs checkstyle:checkstyle cobertura:cobertura

关于如何解决这个问题有什么建议吗?

最佳答案

您需要安装 JFreeChart plugin同样,它需要在 cobertura 中生成图表(这就是为什么类在运行 cobertura 时没有发现异常)但它有 been removed来自主要 hudson 分布:

(JFreeChart ...) Moved to an external plugin. Available from Alpha release. Any external plugins using JFreechart will need to add a dependency on this external plugin to maintain compatibility. For future charting needs BIRT Charts is now bundled as a core plugin

编辑:在传递依赖中有一个错误,如 here 所示.安装 cobertura-plugin 版本 1.6-h-3。 mvn

关于maven - 生成 Cobertura 覆盖率报告时,Hudson 构建失败并出现 NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14949285/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com