A plugin dependency depends on a more recent groovy version

77 views
Skip to first unread message

Valentin Delaye (jonesbusy)

unread,
Nov 9, 2024, 4:21:55 AM11/9/24
to Jenkins Developers
Hi,

I maintains artifactory-client-api-plugin (https://plugins.jenkins.io/artifactory-client-api/) which is an API plugin bundling https://github.com/jfrog/artifactory-client-java)

It's now used by consumer like artifactory-artifact-manager or jobcacher-artifactory-storage

The bundled library artifactory-client-java is implemented with a mix of Java and Groovy code (2.4.21). Until now no issue when using it in Jenkins

However some recent PR https://github.com/jfrog/artifactory-client-java/pull/394 upgraded the build to groovy 4.0.23

I did few tentative (exclusion), pluginFirstClassLoader, classMasking etc but I always end of with weird classpath error during execution of pipeline (like NoClassDefFoundError: org/codehaus/groovy/vmplugin/v8/IndyInterface).

Does anyone know if we faced similar issue when a plugin dependency bundle a more recent version of groovy ? Can we do something about it ?

Thanks for your tips!

Valentin

Jesse Glick

unread,
Nov 12, 2024, 5:46:42 PM11/12/24
to jenkin...@googlegroups.com

Jenkins Developers

unread,
1:36 AM (11 hours ago) 1:36 AM
to Jenkins Developers
Only way I was able to make it work is with `pluginFirstClassLoader` and packaging the groovy 4 as part of plugin artifact

This work on production and required to switch JenkinsRule to RealJenkinsRule for dependent tests (Only the using running pipelines jobs).

The last challenge is make the bom works. Some prep tests are using JenkinsRule

On Tuesday, November 12, 2024 at 11:46:42 PM UTC+1 jgl...@cloudbees.com wrote:
Reply all
Reply to author
Forward
0 new messages