Index: src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
===================================================================
--- src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java	(revision 1411613)
+++ src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java	(working copy)
@@ -1,99 +0,0 @@
-/*
- * 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.oak.jcr;
-
-import java.security.Principal;
-import java.util.Properties;
-import java.util.concurrent.Executors;
-import javax.jcr.Credentials;
-import javax.jcr.GuestCredentials;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.security.auth.login.Configuration;
-
-import org.apache.jackrabbit.mk.core.MicroKernelImpl;
-import org.apache.jackrabbit.oak.security.OakConfiguration;
-import org.apache.jackrabbit.test.NotExecutableException;
-import org.apache.jackrabbit.test.RepositoryStub;
-
-public class OakRepositoryStub extends RepositoryStub {
-
-    private final Repository repository;
-
-    /**
-     * Constructor as required by the JCR TCK.
-     * 
-     * @param settings repository settings
-     * @throws javax.jcr.RepositoryException If an error occurs.
-     */
-    public OakRepositoryStub(Properties settings) throws RepositoryException {
-        super(settings);
-
-        // TODO: OAK-17. workaround for missing test configuration
-        Configuration.setConfiguration(new OakConfiguration());
-
-        String dir = "target/mk-tck-" + System.currentTimeMillis();
-        repository = new Jcr(new MicroKernelImpl(dir))
-            .with(Executors.newScheduledThreadPool(1))
-            .createRepository();
-
-        Session session = repository.login(superuser);
-        try {
-            TestContentLoader loader = new TestContentLoader();
-            loader.loadTestContent(session);
-        } catch (Exception e) {
-            e.printStackTrace(System.err);
-        } finally {
-            session.logout();
-        }
-    }
-
-    /**
-     * Returns the configured repository instance.
-     * 
-     * @return the configured repository instance.
-     */
-    @Override
-    public synchronized Repository getRepository() {
-        return repository;
-    }
-
-    @Override
-    public Credentials getReadOnlyCredentials() {
-        return new GuestCredentials();
-    }
-
-    @Override
-    public Principal getKnownPrincipal(Session session) throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
-    }
-
-    private static final Principal UNKNOWN_PRINCIPAL = new Principal() {
-        @Override
-        public String getName() {
-            return "an_unknown_user";
-        }
-    };
-
-    @Override
-    public Principal getUnknownPrincipal(Session session) throws RepositoryException, NotExecutableException {
-        return UNKNOWN_PRINCIPAL;
-    }
-
-}
Index: pom.xml
===================================================================
--- pom.xml	(revision 1411262)
+++ pom.xml	(working copy)
@@ -333,11 +333,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>oak-lucene</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-api</artifactId>
       <version>${jackrabbit.version}</version>
     </dependency>
@@ -391,19 +386,5 @@
       <scope>test</scope>
     </dependency>
 
-    <!-- TODO temporary solution to IntelliJ not finding embedded dependencies. See OAK-438 -->
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-core</artifactId>
-      <version>4.0.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-analyzers-common</artifactId>
-      <version>4.0.0</version>
-      <scope>test</scope>
-    </dependency>
-
   </dependencies>
 </project>
Index: src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
===================================================================
--- src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java	(revision 1411262)
+++ src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java	(working copy)
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.oak.jcr;
 
+import java.util.List;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import javax.annotation.Nonnull;
@@ -27,8 +28,7 @@
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.index.CompositeIndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
-import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider;
 import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
@@ -48,6 +48,7 @@
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
 
 import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Lists.newArrayList;
 
 public class Jcr {
 
@@ -58,6 +59,8 @@
 
     private SecurityProvider securityProvider;
 
+    private final List<IndexHookProvider> indexProviders = newArrayList();
+
     private Jcr(Oak oak) {
         this.oak = oak;
 
@@ -73,15 +76,11 @@
         with(new RegistrationValidatorProvider());
         with(new ConflictValidatorProvider());
 
-        with(new IndexHookManager(
-                new CompositeIndexHookProvider(
-                new PropertyIndexHookProvider(), 
-                new LuceneIndexHookProvider())));
+        with(new PropertyIndexHookProvider());
         with(new AnnotatingConflictHandler());
 
         with(new PropertyIndexProvider());
         with(new NodeTypeIndexProvider());
-        with(new LuceneIndexProvider());
     }
 
     public Jcr() {
@@ -141,7 +140,14 @@
         return this;
     }
 
+    @Nonnull
+    public Jcr with(@Nonnull IndexHookProvider indexHookProvider) {
+        indexProviders.add(checkNotNull(indexHookProvider));
+        return this;
+    }
+
     public Repository createRepository() {
+        with(new IndexHookManager(CompositeIndexHookProvider.compose(indexProviders)));
         return new RepositoryImpl(
                 oak.createContentRepository(), executor, securityProvider);
     }
Index: src/main/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
===================================================================
--- src/main/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java	(revision 1411262)
+++ src/main/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java	(working copy)
@@ -49,9 +49,9 @@
         Configuration.setConfiguration(new OakConfiguration());
 
         String dir = "target/mk-tck-" + System.currentTimeMillis();
-        repository = new Jcr(new MicroKernelImpl(dir))
-            .with(Executors.newScheduledThreadPool(1))
-            .createRepository();
+        repository = preCreateRepository(
+                new Jcr(new MicroKernelImpl(dir)).with(Executors
+                        .newScheduledThreadPool(1))).createRepository();
 
         Session session = repository.login(superuser);
         try {
@@ -64,6 +64,10 @@
         }
     }
 
+    protected Jcr preCreateRepository(Jcr jcr) {
+        return jcr;
+    }
+
     /**
      * Returns the configured repository instance.
      * 

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

