sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1633623 - in /sling/trunk/bundles/jcr/it-jackrabbit-oak: ./ src/test/java/org/apache/sling/jcr/repository/it/
Date Wed, 22 Oct 2014 14:09:21 GMT
Author: bdelacretaz
Date: Wed Oct 22 14:09:20 2014
New Revision: 1633623

URL: http://svn.apache.org/r1633623
Log:
SLING-3599 - factor out common OSGi setup and add pax debug option

Modified:
    sling/trunk/bundles/jcr/it-jackrabbit-oak/pom.xml
    sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/CommonTests.java
    sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java
    sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/OakRepositoryIT.java

Modified: sling/trunk/bundles/jcr/it-jackrabbit-oak/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/it-jackrabbit-oak/pom.xml?rev=1633623&r1=1633622&r2=1633623&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/it-jackrabbit-oak/pom.xml (original)
+++ sling/trunk/bundles/jcr/it-jackrabbit-oak/pom.xml Wed Oct 22 14:09:20 2014
@@ -27,6 +27,9 @@
         <url.version>2.1.0</url.version>
         <org.ops4j.pax.logging.DefaultServiceLog.level>WARN</org.ops4j.pax.logging.DefaultServiceLog.level>
         <org.ops4j.pax.url.mvn.settings></org.ops4j.pax.url.mvn.settings>
+        
+        <!-- Set this to enable debugging of the VM used to run pax exam -->
+        <pax.vm.options></pax.vm.options>
 
         <!-- 
             WARNING make sure oak.version and sling.oak.server.version 
@@ -80,6 +83,10 @@
                             <name>sling.oak.server.version</name>
                             <value>${sling.oak.server.version}</value>
                         </property>
+                        <property>
+                            <name>pax.vm.options</name>
+                            <value>${pax.vm.options}</value>
+                        </property>
                     </systemProperties>
                     <argLine>
                         -Xmx1024m -XX:MaxPermSize=256m

Modified: sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/CommonTests.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/CommonTests.java?rev=1633623&r1=1633622&r2=1633623&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/CommonTests.java
(original)
+++ sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/CommonTests.java
Wed Oct 22 14:09:20 2014
@@ -21,10 +21,14 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.vmOptions;
 
-import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -51,6 +55,7 @@ import org.apache.sling.jcr.api.SlingRep
 import org.junit.After;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.ops4j.pax.exam.Option;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.util.tracker.ServiceTracker;
@@ -72,6 +77,10 @@ public abstract class CommonTests {
 
     @Inject
     protected BundleContext bundleContext;
+    
+    // TODO doesn't work yet
+    // @Inject
+    // protected ResourceResolverFactory resourceResolverFactory;
 
     /** Check some repository descriptors to make sure we're
      *  testing the expected implementation. */
@@ -126,6 +135,86 @@ public abstract class CommonTests {
             return jcrEventsCounter;
         }
     }
+    
+    public Collection<Option> commonOptions() {
+        final String localRepo = System.getProperty("maven.repo.local", "");
+        final String paxVmOptions = System.getProperty("pax.vm.options", "");
+        
+        final List<Option> opt = new LinkedList<Option>();
+        if(localRepo.length() > 0 ) {
+            opt.add(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo));
+        }
+        if(paxVmOptions.length() > 0) {
+            opt.add(vmOptions(paxVmOptions));
+        }
+        
+        final String SLF4J_VERSION = "1.7.5";
+        opt.add(mavenBundle("org.slf4j", "slf4j-api", SLF4J_VERSION));
+        opt.add(mavenBundle("org.slf4j", "jcl-over-slf4j", SLF4J_VERSION));
+        opt.add(mavenBundle("org.slf4j", "log4j-over-slf4j", SLF4J_VERSION));
+        
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.fragment.xml", "1.0.2"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.fragment.transaction",
"1.0.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.fragment.activation", "1.0.2"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.fragment.ws", "1.0.2"));
+
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.log", "4.0.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.logservice", "1.0.2"));
+
+        opt.add(mavenBundle("commons-io", "commons-io", "1.4"));
+        opt.add(mavenBundle("commons-fileupload", "commons-fileupload", "1.3.1"));
+        opt.add(mavenBundle("commons-collections", "commons-collections", "3.2.1"));
+        opt.add(mavenBundle("commons-codec", "commons-codec", "1.9"));
+        opt.add(mavenBundle("commons-lang", "commons-lang", "2.6"));
+        opt.add(mavenBundle("commons-pool", "commons-pool", "1.6"));
+
+        opt.add(mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.concurrent",
"1.3.4_1"));
+
+        opt.add(mavenBundle("org.apache.geronimo.bundles", "commons-httpclient", "3.1_1"));
+        opt.add(mavenBundle("org.apache.tika", "tika-core", "1.2"));
+        opt.add(mavenBundle("org.apache.tika", "tika-bundle", "1.2"));
+
+        opt.add(mavenBundle("org.apache.felix", "org.apache.felix.http.jetty", "2.2.2"));
+        opt.add(mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.3.2"));
+        opt.add(mavenBundle("org.apache.felix", "org.apache.felix.scr", "1.8.2"));
+        opt.add(mavenBundle("org.apache.felix", "org.apache.felix.configadmin", "1.8.0"));
+        opt.add(mavenBundle("org.apache.felix", "org.apache.felix.inventory", "1.0.4"));
+
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.2.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.json", "2.0.6"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.mime", "2.1.4"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.classloader", "1.3.2"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.scheduler", "2.4.2"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.commons.threads", "3.2.0"));
+
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.launchpad.api", "1.1.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.auth.core", "1.1.6"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.discovery.api", "1.0.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.discovery.standalone",
"1.0.0"));
+
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.api", "2.7.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.settings", "1.3.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.resourceresolver", "1.1.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.adapter", "2.1.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.resource", "2.3.11-SNAPSHOT"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.classloader", "3.2.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.contentloader", "2.1.8"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.engine", "2.3.2"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.event", "3.2.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.serviceusermapper", "1.0.0"));
+        
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.testing.tools", "1.0.6"));
+        opt.add(mavenBundle("org.apache.httpcomponents", "httpcore-osgi", "4.1.2"));
+        opt.add(mavenBundle("org.apache.httpcomponents", "httpclient-osgi", "4.1.2"));
+
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.jcr-wrapper", "2.0.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.api", "2.2.0"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.base", "2.2.2"));
+        
+        opt.add(junitBundles());
+        return opt;
+    }
+
 
     private <ItemType extends Item> ItemType deleteAfterTests(ItemType it) throws RepositoryException
{
         toDelete.add(it.getPath());
@@ -341,7 +430,7 @@ public abstract class CommonTests {
     }
 
     @Test
-    @Ignore("SLING-3599 - doesn't work with Oak yet")
+    @Ignore("SLING-3599")
     public void testOsgiResourceEvents() throws RepositoryException {
         final ResourceEventListener listener = new ResourceEventListener();
         final ServiceRegistration reg = listener.register(bundleContext, SlingConstants.TOPIC_RESOURCE_ADDED);
@@ -448,13 +537,23 @@ public abstract class CommonTests {
 
     }
 
-    public void setup() throws IOException {
+    public void setup() throws Exception {
         final ServiceTracker st = new ServiceTracker(bundleContext, SlingRepository.class.getName(),
null);
         st.open(true);
         try {
             this.repository = (SlingRepository) st.waitForService(10000);
         } catch (InterruptedException e) {
         }
+        
+        // Make sure the JcrResourceProvider is initialized, as it
+        // setups conversion of JCR to OSGi events, and some tests use this 
+// TODO doesn't work yet        
+//        final ResourceResolver rr = resourceResolverFactory.getAdministrativeResourceResolver(null);
+//        try {
+//            rr.getResource("/");
+//        } finally {
+//            rr.close();
+//        }
     }
 
 }
\ No newline at end of file

Modified: sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java?rev=1633623&r1=1633622&r2=1633623&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java
(original)
+++ sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java
Wed Oct 22 14:09:20 2014
@@ -18,13 +18,10 @@
 package org.apache.sling.jcr.repository.it;
 
 import static org.junit.Assert.assertEquals;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.when;
 
-import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
 
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -39,83 +36,19 @@ public class JackrabbitRepositoryIT exte
 
     @org.ops4j.pax.exam.Configuration
     public Option[] config() {
-        final String localRepo = System.getProperty("maven.repo.local", "");
 
-        return options(
-                when( localRepo.length() > 0 ).useOptions(
-                        systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo)
-                ),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.xml", "1.0.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.transaction",
"1.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.activation", "1.0.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.ws", "1.0.2"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.log", "4.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.logservice", "1.0.2"),
-
-                mavenBundle("org.slf4j", "slf4j-api", "1.6.4"),
-                mavenBundle("org.slf4j", "jcl-over-slf4j", "1.6.4"),
-                mavenBundle("org.slf4j", "log4j-over-slf4j", "1.6.4"),
-
-                mavenBundle("commons-io", "commons-io", "1.4"),
-                mavenBundle("commons-fileupload", "commons-fileupload", "1.3.1"),
-                mavenBundle("commons-collections", "commons-collections", "3.2.1"),
-                mavenBundle("commons-codec", "commons-codec", "1.9"),
-                mavenBundle("commons-lang", "commons-lang", "2.6"),
-                mavenBundle("commons-pool", "commons-pool", "1.6"),
-
-                mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.concurrent",
"1.3.4_1"),
-
-                mavenBundle("org.apache.geronimo.bundles", "commons-httpclient", "3.1_1"),
-                mavenBundle("org.apache.tika", "tika-core", "1.2"),
-                mavenBundle("org.apache.tika", "tika-bundle", "1.2"),
-
-                mavenBundle("org.apache.felix", "org.apache.felix.http.jetty", "2.2.2"),
-                mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.3.2"),
-                mavenBundle("org.apache.felix", "org.apache.felix.scr", "1.8.2"),
-                mavenBundle("org.apache.felix", "org.apache.felix.configadmin", "1.8.0"),
-                mavenBundle("org.apache.felix", "org.apache.felix.inventory", "1.0.4"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.2.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.json", "2.0.6"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.mime", "2.1.4"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.classloader", "1.3.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.scheduler", "2.4.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.threads", "3.2.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.launchpad.api", "1.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.auth.core", "1.1.6"),
-                mavenBundle("org.apache.sling", "org.apache.sling.discovery.api", "1.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.discovery.standalone",
"1.0.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.api", "2.7.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.settings", "1.3.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.resourceresolver", "1.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.adapter", "2.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.resource", "2.3.6"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.classloader", "3.2.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.contentloader", "2.1.8"),
-                mavenBundle("org.apache.sling", "org.apache.sling.engine", "2.3.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.event", "3.2.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.serviceusermapper", "1.0.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.jcr-wrapper", "2.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.api", "2.2.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.base", "2.2.2"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-api", "2.6.5"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-commons", "2.6.5"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-spi", "2.6.5"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-spi-commons", "2.6.5"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-rmi", "2.6.5"),
-                mavenBundle("org.apache.derby", "derby", "10.5.3.0_1"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.jackrabbit.server",
"2.2.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.testing.tools", "1.0.6"),
-                mavenBundle("org.apache.httpcomponents", "httpcore-osgi", "4.1.2"),
-                mavenBundle("org.apache.httpcomponents", "httpclient-osgi", "4.1.2"),
+        final List<Option> opt = new LinkedList<Option>();
+        opt.addAll(commonOptions());
 
-                junitBundles()
-           );
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-api", "2.6.5"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-commons", "2.6.5"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-spi", "2.6.5"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-spi-commons", "2.6.5"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-rmi", "2.6.5"));
+        opt.add(mavenBundle("org.apache.derby", "derby", "10.5.3.0_1"));
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.jackrabbit.server",
"2.2.0"));
+
+        return opt.toArray(new Option[]{});
     }
 
     @Override
@@ -125,7 +58,7 @@ public class JackrabbitRepositoryIT exte
 
     @Override
     @Before
-    public void setup() throws IOException {
+    public void setup() throws Exception {
         super.setup();
     }
 }

Modified: sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/OakRepositoryIT.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/OakRepositoryIT.java?rev=1633623&r1=1633622&r2=1633623&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/OakRepositoryIT.java
(original)
+++ sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/OakRepositoryIT.java
Wed Oct 22 14:09:20 2014
@@ -18,15 +18,12 @@
 package org.apache.sling.jcr.repository.it;
 
 import static org.junit.Assert.fail;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.when;
 
-import java.io.IOException;
 import java.util.Dictionary;
 import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.List;
 
 import javax.inject.Inject;
 
@@ -51,94 +48,31 @@ public class OakRepositoryIT extends Com
 
     @org.ops4j.pax.exam.Configuration
     public Option[] config() {
-        final String localRepo = System.getProperty("maven.repo.local", "");
         final String oakVersion = System.getProperty("oak.version", "NO_OAK_VERSION??");
         final String slingOakServerVersion = System.getProperty("sling.oak.server.version",
"NO_OAK_SERVER_VERSION??");
-        final String SLF4J_VERSION = "1.7.5";
 
-        return options(
-                when( localRepo.length() > 0 ).useOptions(
-                        systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo)
-                ),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.xml", "1.0.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.transaction",
"1.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.activation", "1.0.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.fragment.ws", "1.0.2"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.log", "4.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.logservice", "1.0.2"),
-
-                mavenBundle("org.slf4j", "slf4j-api", SLF4J_VERSION),
-                mavenBundle("org.slf4j", "jcl-over-slf4j", SLF4J_VERSION),
-                mavenBundle("org.slf4j", "log4j-over-slf4j", SLF4J_VERSION),
-
-                mavenBundle("commons-io", "commons-io", "1.4"),
-                mavenBundle("commons-fileupload", "commons-fileupload", "1.2.2"),
-                mavenBundle("commons-collections", "commons-collections", "3.2.1"),
-                mavenBundle("commons-codec", "commons-codec", "1.6"),
-                mavenBundle("commons-lang", "commons-lang", "2.5"),
-
-                mavenBundle("org.apache.geronimo.bundles", "commons-httpclient", "3.1_1"),
-                mavenBundle("org.apache.tika", "tika-core", "1.2"),
-                mavenBundle("org.apache.tika", "tika-bundle", "1.2"),
-
-                mavenBundle("org.apache.felix", "org.apache.felix.http.jetty", "2.2.0"),
-                mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.2.14"),
-                mavenBundle("org.apache.felix", "org.apache.felix.scr", "1.8.0"),
-                mavenBundle("org.apache.felix", "org.apache.felix.configadmin", "1.6.0"),
-                mavenBundle("org.apache.felix", "org.apache.felix.inventory", "1.0.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.2.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.json", "2.0.6"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.mime", "2.1.4"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.classloader", "1.3.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.scheduler", "2.3.4"),
-                mavenBundle("org.apache.sling", "org.apache.sling.commons.threads", "3.2.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.launchpad.api", "1.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.auth.core", "1.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.discovery.api", "1.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.discovery.standalone",
"1.0.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.api", "2.7.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.settings", "1.3.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.resourceresolver", "1.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.adapter", "2.1.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.resource", "2.3.11-SNAPSHOT"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.classloader", "3.1.12"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.contentloader", "2.1.2"),
-                mavenBundle("org.apache.sling", "org.apache.sling.engine", "2.2.6"),
-                mavenBundle("org.apache.sling", "org.apache.sling.serviceusermapper", "1.0.0"),
-
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.jcr-wrapper", "2.0.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.api", "2.2.0"),
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.base", "2.2.2"),
-
-                // Oak
-                mavenBundle("org.apache.sling", "org.apache.sling.jcr.oak.server", slingOakServerVersion),
-                mavenBundle("com.google.guava", "guava", "15.0"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-api", "2.7.5"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-commons", "2.7.5"),
-                mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-rmi", "2.4.2"),
-                mavenBundle("org.apache.jackrabbit", "oak-core", oakVersion),
-                // embedded for now mavenBundle("org.apache.jackrabbit", "oak-jcr", oakVersion),
-                mavenBundle("org.apache.jackrabbit", "oak-commons", oakVersion),
-
-                // not needed anymore?
-                mavenBundle("org.apache.jackrabbit", "oak-mk", oakVersion),
-                mavenBundle("org.apache.jackrabbit", "oak-mk-api", oakVersion),
-                mavenBundle("org.apache.jackrabbit", "oak-mk-remote", oakVersion),
-
-                mavenBundle("org.apache.jackrabbit", "oak-lucene", oakVersion),
-                mavenBundle("org.apache.jackrabbit", "oak-blob", oakVersion),
-
-                // Testing
-                mavenBundle("org.apache.sling", "org.apache.sling.testing.tools", "1.0.6"),
-                mavenBundle("org.apache.httpcomponents", "httpcore-osgi", "4.1.2"),
-                mavenBundle("org.apache.httpcomponents", "httpclient-osgi", "4.1.2"),
+        final List<Option> opt = new LinkedList<Option>();
+        opt.addAll(commonOptions());
 
-                junitBundles()
-           );
+        // Oak
+        opt.add(mavenBundle("org.apache.sling", "org.apache.sling.jcr.oak.server", slingOakServerVersion));
+        opt.add(mavenBundle("com.google.guava", "guava", "15.0"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-api", "2.7.5"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-commons", "2.7.5"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "jackrabbit-jcr-rmi", "2.4.2"));
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-core", oakVersion));
+        // embedded for now opt.add(mavenBundle("org.apache.jackrabbit", "oak-jcr", oakVersion));
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-commons", oakVersion));
+
+        // not needed anymore?
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-mk", oakVersion));
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-mk-api", oakVersion));
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-mk-remote", oakVersion));
+
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-lucene", oakVersion));
+        opt.add(mavenBundle("org.apache.jackrabbit", "oak-blob", oakVersion));
+        
+        return opt.toArray(new Option[]{});
     }
 
     @Override
@@ -156,7 +90,7 @@ public class OakRepositoryIT extends Com
 
     @Override
     @Before
-    public void setup() throws IOException {
+    public void setup() throws Exception {
         final org.osgi.service.cm.Configuration cf = this.configAdmin.getConfiguration("org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService",
null);
         final Dictionary<String, Object> p = new Hashtable<String, Object>();
         p.put("name", "Default NodeStore");



Mime
View raw message