Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10972

Testing Sling Mock Oak: Shade (embed and relocate) Guava

    XMLWordPrintableJSON

Details

    Description

      All Oak bundles are already shaded in https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/blob/4f738b2cb2e493c9dc45d0e0f0350705ac548062/pom.xml#L170-L196.

      This doesn't include the transitive dependency Guava which must be version 15 as Guava is not 100% backwards compatible (see https://issues.apache.org/jira/browse/OAK-7182). In some cases custom bundles shade/embed newer Guava classes without exporting those (e.g. https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/77104988d6971e7d43aa973f859bcdf5a9596f25/bundle/pom.xml#L288). As this currently prevents executing test with Sling Mock Oak, the Guava dependency should be shaded as well in sling-mock-oak.

      That way one can use Guava 15 (the shaded version from Sling Mock Oak) for testing, while the same bundle can still embed/shade a newer version. Class duplications are prevented as the shaded version in Sling Mock Oak is relocated.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m