Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i use java libraries in a jenkins pipeline?

Is it possible to import and use regular java libraries in a jenkins pipeline Shared Library? I want to import the AWS SDK for java and using it directly in the pipeline code. Do I have to add it to the src dir of my Shared Library?

like image 936
red888 Avatar asked Sep 30 '17 05:09

red888


1 Answers

You can use Groovy Grapes:

@Grab('com.amazonaws:aws-java-sdk:1.11.205')
import ...
like image 134
Jonatan Ivanov Avatar answered Sep 21 '22 22:09

Jonatan Ivanov