1

I recently ran into the problem that a Java library I loaded through grape was obviously hidden by a dependency of the Jira Plugin (Which Jersey version runs in Jenkins 2.107.1?). The possibility of such a conflict is also documented in https://issues.jenkins-ci.org/browse/JENKINS-44378.

This makes me wonder: If my pipeline and the Jenkins plugins live in the same JVM without any separation, I can never know which version of a specific jar/class will be used and it is very difficult to stably run a pipeline.

I can only think of two solutions:

  1. I do not load external libraries through grape, but put some functionality into REST services which I call from the pipeline.

  2. I somehow tell Jenkins to run my pipeline in separation (separate JVM, separate classloader, etc.)

I would prefer (2), but I do not know how to achieve it. Any suggestions?

M. Justin
  • 14,487
  • 7
  • 91
  • 130
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • 1
    Sounds similar to https://stackoverflow.com/questions/43824805/how-can-i-isolate-my-jenkins-pipeline-groovy-shared-library-classloader – mkobit Mar 23 '18 at 15:52

0 Answers0