[英]Jenkins - Execute system Groovy script plugin (Build step)
Hi i'm trying to execute a groovy script inside the system Groovy script, i'm trying to import "groovyx.net.http.HTTPBuilder", unfortunately i'm getting an error - unable to resolve class groovyx.net.http.HTTPBuilder
嗨,我正在尝试在系统Groovy脚本中执行groovy脚本,我正在尝试导入“ groovyx.net.http.HTTPBuilder”,不幸的是,我遇到了一个错误- unable to resolve class groovyx.net.http.HTTPBuilder
Is there any way to use this package ? 有什么办法可以使用这个软件包吗?
If there is Grape support for system groovy Jenkins scripts you might try to use dependency management with Grape . 如果Grape支持系统常规的Jenkins脚本,则可以尝试将依赖管理与Grape一起使用。 In your case it might be: 在您的情况下,可能是:
@Grab(group='org.codehaus.groovy.modules', module='http-builder', version='0.7.1') import org.codehaus.groovy.modules.http-builder
Dependencies are getting from Maven so Master need to have Maven binary on it's configuration. 依赖关系来自Maven,因此Master需要在其配置上具有Maven二进制文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.