You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:23:02 UTC

[sling-org-apache-sling-testing-sling-mock] 07/20: SLING-4932, make compatible with o.a.s.jcr.resource 2.5 (requires also an upgrade to Sling API 2.9)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 05758efbf3bd34891c16f31ffd51c6fbefc939f6
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Aug 10 14:40:15 2015 +0000

    SLING-4932, make compatible with o.a.s.jcr.resource 2.5 (requires also an upgrade to Sling API 2.9)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1695088 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                             | 4 ++--
 .../sling/testing/mock/sling/MockJcrResourceResolverFactory.java    | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index a6d0b0a..69b20be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.4.0</version>
+            <version>2.9.0</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
@@ -95,7 +95,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.jcr.resource</artifactId>
-            <version>2.3.6</version>
+            <version>2.5.4</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java b/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java
index 1396284..b82d513 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java
@@ -32,6 +32,7 @@ import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory;
+import org.apache.sling.jcr.resource.internal.helper.jcr.PathMapper;
 import org.apache.sling.testing.mock.osgi.MockOsgi;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
@@ -59,6 +60,11 @@ class MockJcrResourceResolverFactory extends AbstractMockResourceResolverFactory
         if (bundleContext.getServiceReference(SlingRepository.class.getName()) == null) {
             bundleContext.registerService(SlingRepository.class.getName(), this.slingRepository, null);
         }
+        
+        // setup PathMapper which is a mandatory service for JcrProviderFactory
+        if (bundleContext.getServiceReference(PathMapper.class.getName()) == null) {
+            bundleContext.registerService(PathMapper.class.getName(), new PathMapper(), null);
+        }
 
         // setup real sling JCR resource provider implementation for use in
         // mocked context

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.