Hi Fritz, although jclouds claims to require Guice 7, in practice it
works with Guice 6, which supports both javax and jakarta style
imports. In fact, in JCLOUDS-1629 I had suggested that jclouds upgrade
only to Guice 6, but it seems that they had some difficulty getting
their tests to pass with Guice 6 and went straight for Guice 7, thus
creating this problem.

Artifact Manager on S3 also uses jclouds and thus has the same
problem. I worked around it there by turning off the Enforcer warnings
in 
https://github.com/jenkinsci/artifact-manager-s3-plugin/blob/e7c0bffccd209e31feff8a5ffde791c5758d09f3/pom.xml#L303-L332
and 
https://github.com/jenkinsci/plugin-compat-tester/blob/347dabf6092a29ce17df87c9c8b7631b0bf7c92f/src/main/java/org/jenkins/tools/test/hook/ArtifactManagerS3Hook.java.
The second of these links contains a comment explaining why this
works. You could possibly adopt the same workaround in your plugin.
James had an idea for how to clean up this workaround even further,
but I don't remember the details now.

Of course, in the long term Jenkins core should upgrade to Guice 7, as
you point out. The problem with doing this at the moment is that it
would break the (very much not recommended) Jenkins Maven plugin,
which embeds Maven inside of Jenkins using the old javax (not jakarta)
style imports and uses Guice internally. I filed MNG-8027 upstream to
track this Maven issue, but the Maven developers have not yet
prioritized it. So for us to upgrade to Guice 7 in the long term, we
would need to either fix MNG-8027, officially drop support for the
Jenkins Maven plugin (which is still being used by some people), or
find some other solution to keep the Jenkins Maven plugin working with
Guice 7.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAFwNDjqdBwicsko7yjFpHm%2BKLQ8-2iTL2ErH%2Bk6FpZp0fME-QA%40mail.gmail.com.

Reply via email to