2017-02-15 64 views
0

在我的Jenkins构建中,我使用的是pipeline plugin在Jenkins管道插件中使用@Grab

其中,我正在进行REST调用。

该呼叫,我需要使用:

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7') 

然而,为了这个,我正在错误:

org.codehaus.groovy.control.MultipleCompilationErrorsExcepti‌​on: startup failed: General error during conversion: Error grabbing Grapes -- [unresolved dependency: org.codehaus.groovy.modules.http-builder#http-builder;0.7: not found] 

那么,怎样才能我在詹金斯流水线插件使用@Grab

回答

0

发生异常是因为不知何故葡萄没有找到httpclient 4.2.1,所以添加http客户端4.2.6,它应该为你工作。

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7') 

@Grab('org.apache.httpcomponents:httpclient:4.2.6') 
相关问题