1

我正在开发一个具有codenarc插件的 grails 应用程序。而且我正在使用哈德森构建工具。我正在将应用程序与hudson构建工具集成。在哈德逊我已经配置了违规插件。但是当我构建应用程序时,我遇到了以下错误。

hudson.util.IOException2: Cannot parse CodeNarcReport.xml
    at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:64)
    at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
    at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
    at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
    at hudson.FilePath.act(FilePath.java:757)
    at hudson.FilePath.act(FilePath.java:739)
    at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:622)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:601)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:579)
    at hudson.model.Build$RunnerImpl.post2(Build.java:156)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:548)
    at hudson.model.Run.run(Run.java:1386)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:145)
Caused by: java.lang.NullPointerException
    at hudson.plugins.violations.model.Violation.compareTo(Violation.java:192)
    at hudson.plugins.violations.model.Violation.compareTo(Violation.java:8)
    at java.util.TreeMap.put(Unknown Source)
    at java.util.TreeSet.add(Unknown Source)
    at hudson.plugins.violations.model.FullFileModel.addViolation(FullFileModel.java:24)
    at hudson.plugins.violations.types.codenarc.CodenarcParser.parseFileElement(CodenarcParser.java:90)
    at hudson.plugins.violations.types.codenarc.CodenarcParser.execute(CodenarcParser.java:47)
    at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59)
    ... 16 more

谁能帮我解决这个问题?

Grails 版本:1.3.7

哈德逊版本:1.398

4

2 回答 2

2

通过将违规插件更新到 0.7.8 快照版本修复了该问题。下载链接

于 2011-04-10T10:03:58.143 回答
0

我建议在 CodeNarc 邮件列表上询问 CodeNarc 问题。另外,请注意 Hudson/Jenkins 插件通常捆绑了旧版本的 CodeNarc。它不是由 CodeNarc 团队维护的。我建议坚持使用由团队维护的 Grails 插件。

谢谢,哈姆雷特(CodeNarc 开发人员)

于 2011-04-10T14:24:53.657 回答