【问题标题】:shared jenkins library build.gradle error共享 jenkins 库 build.gradle 错误
【发布时间】:2018-09-16 07:42:19
【问题描述】:

我是 groovy 和 gradle 的新手,因为我正在为 jenkins 管道构建一个小型共享库,在执行 gradle build 命令时,我收到错误 unable to resolve class hudson.model.Actionable。我知道 gradle 需要这个依赖才能执行这个命令。我的菜鸟问题:如何将以下库添加到依赖项块 build.gradle?

  • hudson.model.Actionable
  • hudson.tasks.junit.CaseResult
  • hudson.tasks.test.AbstractTestResultAction 我也有这个错误: 无法解析类 NonCPS ,无法找到注释类

总结一下,如何在 build.gradle 中添加 hudson.model 和 hudson.task 以及 nonCPS 类作为依赖项?

【问题讨论】:

    标签: android jenkins gradle groovy shared-libraries


    【解决方案1】:

    我终于找到了解决这个问题的方法,我只是把它放在这里以防万一有人遇到同样的问题:

    compile 'com.cloudbees:groovy-cps:1.24'
    compile 'org.eclipse.hudson:hudson-core:3.2.1'
    compileOnly 'javax.servlet:servlet-api:2.5'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      • 2021-10-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多