Java11 compatibility and guice 4.0 vs. 4.2.3

409 views
Skip to first unread message

Fritz Elfert

unread,
Mar 7, 2021, 8:23:50 AM3/7/21
to jenkin...@googlegroups.com
Hi *,

I recently got a PR for the jclouds-plugin which claims to establish java11 compatibility.
Knowing that jclouds-2.2.x is NOT java11-ready yet, I postponed this until jclouds-2.3.0 is out.
Well, yesterday they released 2.3.0 and I started working on that PR. Unfortunately, it turns out
that jclouds-2.3.0 depends on guice-4.2.3. Apparently they did this because of java11 compatibility issues.
A short search for java11 compatibility of guice-4.0 shows, that it is definitively *NOT* java11-ready.

The maven-enforcer blocks this currently:

[WARNING] Rule 4: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for com.google.inject:guice:4.0 paths to dependency are:
+-org.jenkins-ci.plugins:jclouds-shaded:2.21-SNAPSHOT
+-org.apache.jclouds:jclouds-core:2.3.0
+-com.google.inject:guice:4.0 (managed) <-- com.google.inject:guice:4.2.3
and
+-org.jenkins-ci.plugins:jclouds-shaded:2.21-SNAPSHOT
+-org.apache.jclouds:jclouds-core:2.3.0
+-com.google.inject:guice:4.0 (managed) <-- com.google.inject:guice:4.2.3
and
+-org.jenkins-ci.plugins:jclouds-shaded:2.21-SNAPSHOT
+-org.jenkins-ci.main:jenkins-core:2.263.1
+-com.google.inject:guice:4.0 (managed) <-- com.google.inject:guice:4.2.3
and
+-org.jenkins-ci.plugins:jclouds-shaded:2.21-SNAPSHOT
+-org.apache.jclouds:jclouds-core:2.3.0
+-com.google.inject.extensions:guice-assistedinject:4.2.3
+-com.google.inject:guice:4.0 (managed) <-- com.google.inject:guice:4.2.3

This raises the question:
If jenkins claims to be java11-compatible, should it not bump up it's dependency on guice to 4.2.3 as well?

Thanks
-Fritz


OpenPGP_0x6E8338980332A6B0.asc
OpenPGP_signature

Mark Waite

unread,
Mar 7, 2021, 11:58:55 AM3/7/21
to Jenkins Developers
Thanks for sharing what you've learned.  The portions of guice and guava that are used by Jenkins have been working since we introduced Java 11 support last year.  Upgrading guice will also need to be paired with an upgrade of guava.

Thanks,
Mark Waite

Mark Waite

unread,
Mar 7, 2021, 12:02:52 PM3/7/21
to Jenkins Developers
Refer also to draft Jenkins Enhancement Proposal at https://github.com/jenkinsci/jep/pull/336
Reply all
Reply to author
Forward
0 new messages