Index: jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/GenericRepositoryFactory.java
===================================================================
--- jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/GenericRepositoryFactory.java	(revision 896408)
+++ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/GenericRepositoryFactory.java	(working copy)
@@ -127,9 +127,6 @@
             } else if ("http".equalsIgnoreCase(scheme)
                     || "https".equalsIgnoreCase(scheme)){
                 parameters.put(
-                        "org.apache.jackrabbit.spi.RepositoryServiceFactory",
-                        "org.apache.jackrabbit.spi2davex.Spi2davexRepositoryServiceFactory");
-                parameters.put(
                         "org.apache.jackrabbit.spi2davex.uri", parameter);
             } else {
                 throw new RepositoryException(
Index: jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/Spi2davRepositoryFactory.java
===================================================================
--- jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/Spi2davRepositoryFactory.java	(revision 0)
+++ jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/Spi2davRepositoryFactory.java	(revision 0)
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.spi2dav;
+
+import java.util.Map;
+
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.RepositoryFactory;
+
+import org.apache.jackrabbit.jcr2spi.RepositoryImpl;
+import org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory.RepositoryConfigImpl;
+import org.apache.jackrabbit.spi2davex.Spi2davexRepositoryServiceFactory;
+
+public class Spi2davRepositoryFactory implements RepositoryFactory {
+
+    @SuppressWarnings("unchecked")
+    public Repository getRepository(Map parameters) throws RepositoryException {
+        if (parameters == null) {
+            return null;
+        } else if (parameters.containsKey(
+                Spi2davRepositoryServiceFactory.PARAM_REPOSITORY_URI)) {
+            return RepositoryImpl.create(new RepositoryConfigImpl(
+                    new Spi2davRepositoryServiceFactory(), parameters));
+        } else if (parameters.containsKey(
+                Spi2davexRepositoryServiceFactory.PARAM_REPOSITORY_URI)) {
+            return RepositoryImpl.create(new RepositoryConfigImpl(
+                    new Spi2davexRepositoryServiceFactory(), parameters));
+        } else {
+            return null;
+        }
+    }
+
+}

Property changes on: jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/Spi2davRepositoryFactory.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: jackrabbit-spi2dav/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory
===================================================================
--- jackrabbit-spi2dav/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory	(revision 0)
+++ jackrabbit-spi2dav/src/main/resources/META-INF/services/javax.jcr.RepositoryFactory	(revision 0)
@@ -0,0 +1,16 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+org.apache.jackrabbit.spi2dav.Spi2davRepositoryFactory
Index: jackrabbit-spi2dav/pom.xml
===================================================================
--- jackrabbit-spi2dav/pom.xml	(revision 896408)
+++ jackrabbit-spi2dav/pom.xml	(working copy)
@@ -58,6 +58,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr2spi</artifactId>
+      <version>2.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-spi-commons</artifactId>
       <version>2.1-SNAPSHOT</version>
     </dependency>
@@ -113,13 +118,6 @@
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-jcr2spi</artifactId>
       <version>2.1-SNAPSHOT</version>
-      <classifier />
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>jackrabbit-jcr2spi</artifactId>
-      <version>2.1-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>
Index: jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
===================================================================
--- jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java	(revision 896408)
+++ jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java	(working copy)
@@ -221,7 +221,7 @@
         }
     }
 
-    private static class RepositoryConfigImpl implements RepositoryConfig {
+    public static class RepositoryConfigImpl implements RepositoryConfig {
         private final RepositoryServiceFactory serviceFactory;
         private final CacheBehaviour cacheBehaviour;
         private final int itemCacheSize;
