简体   繁体   English

Jenkins-执行系统Groovy脚本插件(构建步骤)

[英]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.

相关问题 使用Groovy和Job DSL插件创建jenkins作业时,添加“ execute python script”作为构建步骤 - Add 'execute python script' as build step while creating a jenkins job using groovy with job dsl plugin Jenkins:管道步骤中的“执行系统groovy脚本”(SCM已提交) - Jenkins: “Execute system groovy script” in a pipeline step (SCM committed) Jenkins-执行系统Groovy脚本 - Jenkins - execute system groovy script jenkins 中执行 groovy 脚本和执行系统 ​​groovy 脚本的区别? - Difference between execute groovy script and the execute system groovy script in jenkins? 编写Jenkins groovy脚本-如何确定哪个构建步骤失败 - Writing a Jenkins groovy script — how to determine which build step failed Jenkins Groovy 脚本中的预期步骤 - Step expected in Jenkins Groovy script Jenkins掩码密码在“执行系统Groovy脚本”中使用 - Jenkins mask passwords use in “Execute system Groovy script” 如何从“执行系统Groovy脚本”更改Jenkins环境变量 - How to change Jenkins environmental variable from 'Execute System Groovy Script' 从Jenkins访问带有密码凭证参数的用户名使用Groovy命令执行Groovy构建步骤? - Accessing a Username with Password Credential Parameter from a Jenkins Execute Groovy build step using Groovy command? 在访问构建变量时在从属服务器上运行(系统/ Jenkins)groovy脚本 - Running (system/Jenkins) groovy script on slave while accessing build variable
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM