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

jcr-mock: Use org.apache.jackrabbit:oak-jcr as only oak dependency

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Testing JCR Mock 1.6.8
    • Testing JCR Mock 1.6.10
    • Testing
    • None

    Description

      jcr-mock users some helper classes from jackrabbit and oak for implementing the mocks.

      for this, some individual oak dependencies are declared in the POM, e.g. oak-jackrabbit-api and recently added oak-security-spi, in https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/20 was also discussion about oak-commons.

      although usually it is best practice to reference exactly the artifact that contains the required classes, it makes managing the oak version in downstream projects more difficult, when the downstream projects want to test against a newer version of oak. that downstream projects usually do not define every single oak-dependency, but only oak-jcr which pulls in all other deps. example:
      https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/blob/e1692937ea4094ad5689429bdfae2dc0e85cf70d/pom.xml#L85-L105

      to simplify the oak version management in unit test contexts, jcr-mock should also directly reference oak-jcr and can use any classes in it's dependencies.

      Attachments

        Issue Links

          Activity

            People

              sseifert Stefan Seifert
              sseifert Stefan Seifert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: