Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36779

Upgrade Guava or properly isolate core Guava dependency from plugins

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • core
    • None
    • 2.320

    Description

      For a while, we could use a newer version of Guava in a plugin than in core - see, for example, jclouds plugin version 2.5, which uses Mask-Classes on the manifestEntries for maven-hpi-plugin to mask com.google.common. That worked fine with core's Guava 11.0 and jclouds' Guava 14.0.1. But moving to a newer jclouds version, with a dependency on Guava 15.0, made things go horribly wrong. I don't remember off the top of my head exactly what went wrong, but I'll reproduce that and add the relevant logs as attachments here. What finally fixed things there was moving to a shaded Guava jar and depending on that - see the state of the code as of here.

      Given that context...I know people are still hitting problems due to Guava incompatibilities - anything with a newer Guava version could fail horribly due to API methods that have since been removed being called by Jenkins itself and borking due to the newer Guava being in the classpath. So something needs to be done here - either better isolation of Guava (either as part of a general improvement to classloader isolation or possibly a more Guava-specific solution) or upgrading Guava...though upgrading Guava means breaking plugins that use/depend on Guava. So...not simple. But some solution is needed eventually.

      Attachments

        Issue Links

          Activity

            People

              basil Basil Crow
              abayer Andrew Bayer
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: