尝试通过allure-jenkins-plugin

时间:2015-04-30 17:22:46

标签: maven jenkins allure

当我尝试通过allure-jenkins-plugin创建诱惑报告时,我收到了这样的错误:

ERROR: Publisher ru.yandex.qatools.allure.jenkins.AllureReportPublisher aborted due to exception
java.io.IOException: java.lang.NullPointerException
    at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:50)
    at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:25)
    at hudson.FilePath.act(FilePath.java:991)
    at hudson.FilePath.act(FilePath.java:969)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:267)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:146)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:764)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:724)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1769)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
Caused by: java.lang.NullPointerException
    at ru.yandex.qatools.clay.internal.AetherUtils.getRepositoriesAsList(AetherUtils.java:183)
    at ru.yandex.qatools.clay.Aether.<init>(Aether.java:60)
    at ru.yandex.qatools.clay.Aether.aether(Aether.java:78)
    at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.createAether(ReportGenerator.java:69)
    at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:45)
    ... 14 more
由诱惑创建的xml文件是有效的(我可以使用相同的xml创建具有maven目标“site”的正确报告),因此问题必须在jenkins插件中。

我安装了maven 3.2.5,settings.xml存在于〜/ .m2目录中,似乎是正确的。

出现这种错误的原因是什么?似乎它与maven设置有某种联系。

1 个答案:

答案 0 :(得分:0)

问题出在maven settings.xml文件的

<activeProfiles> 

部分。它包含的内容实际上并不存在。删除此配置文件解决了这个问题。