开发者

hudson codenarc issue

I am developing a grails application which has codenarc plugin. And also I am using hudson build tool. I am integrating the application with hudson build tool. In the hudson I have configured violation plugin. But when I build the app I am getting following error.

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.mo开发者_StackOverflowdel.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

Can anyone please help me to fix this issue?

Grails version : 1.3.7

Hudson version : 1.398


By updating violation plugin to 0.7.8 snapshot version fixed the issue. Download link


I recommend asking CodeNarc questions on the CodeNarc mailing list. Also, be aware the the Hudson/Jenkins plugin usually has an older version of CodeNarc bundled with it. It's not maintained by the CodeNarc team. I recommend sticking with the Grails plugin, which is maintained by the team.

Thanks, Hamlet (CodeNarc developer)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜