2017-02-15 158 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') 
相關問題