In my Jenkins build, I have a Groovy script(because I am using the Pipeline plugin) where I am trying to make an API call using OkHttpClient
.
I have the following Grape code that I got from here:
@Grapes(
@Grab(group='com.squareup.okhttp', module='okhttp', version='2.7.5')
)
For this, I am getting:
General error during conversion: Error grabbing Grapes -- [unresolved dependency: com.squareup.okkhttp#okhttp;2.7.5: not found]
java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: com.squareup.okhttp#okhttp;2.7.5: not found]
at sun.reflect.NativeContructorAccessorImpl.newInstance0(Native Method)
Any idea what could be wrong?
Can't Grape retrieve packages when running in a Jenkins pipeline script?