[英]shared jenkins library build.gradle error
I am a newbie to groovy and gradle as i am building a small shared library for jenkins pipeline, when executing gradle build
command i get an error unable to resolve class hudson.model.Actionable
. 我是groovy和gradle的新手,因为我正在为jenkins管道构建一个小型共享库,当执行gradle build
命令时,出现一个unable to resolve class hudson.model.Actionable
的错误。 I understand that gradle need this dependency to be able to execute this command. 我了解gradle需要此依赖关系才能执行此命令。 My noob question: how do i add the following libs to the dependencies block build.gradle? 我的菜鸟问题:如何将以下库添加到依赖项块build.gradle?
To sum it up, how do i add hudson.model and hudson.task and nonCPS class as dependencies in build.gradle? 综上所述,如何将hudson.model和hudson.task以及nonCPS类添加为build.gradle中的依赖项?
I finally found a way to solve this, I am just putting this here in case anyone encounters the same issue: 我终于找到了解决此问题的方法,只是将其放在此处,以防有人遇到相同的问题:
compile 'com.cloudbees:groovy-cps:1.24'
compile 'org.eclipse.hudson:hudson-core:3.2.1'
compileOnly 'javax.servlet:servlet-api:2.5'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.