Author: gnodet
Date: Wed Sep  2 20:57:02 2009
New Revision: 810698

URL: http://svn.apache.org/viewvc?rev=810698&view=rev
Log:
Try to fix integration tests

Added:
    
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/AbstractIntegrationTest.java
Removed:
    
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/resources/org/apache/servicemix/
Modified:
    servicemix/sandbox/karaf/nmr/jbi/deployer/pom.xml
    servicemix/sandbox/karaf/nmr/jbi/itests/pom.xml
    
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
    
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/ManagementTest.java
    servicemix/sandbox/karaf/nmr/jbi/itests/src/test/resources/log4j.properties
    servicemix/sandbox/karaf/nmr/jbi/osgi/pom.xml
    servicemix/sandbox/karaf/nmr/nmr/osgi/pom.xml
    servicemix/sandbox/karaf/nmr/pom.xml
    
servicemix/sandbox/karaf/nmr/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/AbstractIntegrationTest.java

Modified: servicemix/sandbox/karaf/nmr/jbi/deployer/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/deployer/pom.xml?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- servicemix/sandbox/karaf/nmr/jbi/deployer/pom.xml (original)
+++ servicemix/sandbox/karaf/nmr/jbi/deployer/pom.xml Wed Sep  2 20:57:02 2009
@@ -88,6 +88,7 @@
                         
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                         <Import-Package>
                             javax.transaction,
+                            javax.management.loading,
                             
org.apache.geronimo.transaction.manager;resolution:=optional,
                             *
                         </Import-Package>

Modified: servicemix/sandbox/karaf/nmr/jbi/itests/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/itests/pom.xml?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- servicemix/sandbox/karaf/nmr/jbi/itests/pom.xml (original)
+++ servicemix/sandbox/karaf/nmr/jbi/itests/pom.xml Wed Sep  2 20:57:02 2009
@@ -37,6 +37,34 @@
     </properties>
 
     <dependencies>
+        <!-- Pax EXAM -->
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit-extender-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.5</version>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>
             <artifactId>org.apache.servicemix.bundles.ant</artifactId>
@@ -53,6 +81,20 @@
             <artifactId>org.apache.felix.fileinstall</artifactId>
             <version>${felix.fileinstall.version}</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.aopalliance</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>
@@ -101,6 +143,12 @@
             <groupId>org.apache.servicemix.jbi</groupId>
             <artifactId>org.apache.servicemix.jbi.osgi</artifactId>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix.jbi</groupId>
@@ -111,6 +159,12 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.prefs</artifactId>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
            <dependency>
             <groupId>org.apache.xbean</groupId>
@@ -169,6 +223,56 @@
             <version>${spring.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf</groupId>
+            <artifactId>org.apache.felix.karaf.management</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.jaas</groupId>
+            <artifactId>org.apache.felix.karaf.jaas.boot</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.jaas</groupId>
+            <artifactId>org.apache.felix.karaf.jaas.config</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.gshell</groupId>
+            <artifactId>org.apache.felix.karaf.gshell.console</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.gshell</groupId>
+            <artifactId>org.apache.felix.karaf.gshell.osgi</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.gshell</groupId>
+            <artifactId>org.apache.felix.karaf.gshell.log</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf</groupId>
+            <artifactId>org.apache.felix.karaf.main</artifactId>
+            <version>${felix.karaf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+            <version>${mina.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sshd</groupId>
+            <artifactId>sshd-core</artifactId>
+            <version>${sshd.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.gogo</groupId>
+            <artifactId>org.apache.felix.gogo.runtime</artifactId>
+            <version>${felix.gogo.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

Added: 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/AbstractIntegrationTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/AbstractIntegrationTest.java?rev=810698&view=auto
==============================================================================
--- 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/AbstractIntegrationTest.java
 (added)
+++ 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/AbstractIntegrationTest.java
 Wed Sep  2 20:57:02 2009
@@ -0,0 +1,161 @@
+/*
+ * 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.servicemix.jbi.itests;
+
+import java.util.Dictionary;
+import java.util.Properties;
+import java.io.FileInputStream;
+import java.io.File;
+import java.io.IOException;
+
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Inject;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+public abstract class AbstractIntegrationTest {
+
+    public static final long DEFAULT_TIMEOUT = 30000;
+
+    @Inject
+    protected BundleContext bundleContext;
+
+    protected <T> T getOsgiService(Class<T> type, long timeout) {
+        return getOsgiService(type, null, timeout);
+    }
+
+    protected <T> T getOsgiService(Class<T> type) {
+        return getOsgiService(type, null, DEFAULT_TIMEOUT);
+    }
+
+    protected <T> T getOsgiService(Class<T> type, String filter, long timeout) 
{
+        ServiceTracker tracker = null;
+        try {
+            String flt;
+            if (filter != null) {
+                if (filter.startsWith("(")) {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() 
+ ")" + filter + ")";
+                } else {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() 
+ ")(" + filter + "))";
+                }
+            } else {
+                flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")";
+            }
+            Filter osgiFilter = FrameworkUtil.createFilter(flt);
+            tracker = new ServiceTracker(bundleContext, osgiFilter, null);
+            tracker.open(true);
+            // Note that the tracker is not closed to keep the reference
+            // This is buggy, as the service reference may change i think
+            Object svc = type.cast(tracker.waitForService(timeout));
+            if (svc == null) {
+
+                Dictionary dic = bundleContext.getBundle().getHeaders();
+                System.err.println("Test bundle headers: " + dic);
+                ServiceReference[] refs = 
bundleContext.getAllServiceReferences(null, null);
+                if (refs != null) {
+                    for (ServiceReference ref : refs) {
+                        System.err.println("ServiceReference: " + ref);
+                    }
+                } else {
+                    System.err.println("No references");
+                }
+                refs = bundleContext.getAllServiceReferences(null, flt);
+                if (refs != null) {
+                    for (ServiceReference ref : refs) {
+                        System.err.println("Filtered ServiceReference: " + 
ref);
+                    }
+                } else {
+                    System.err.println("No filtered references");
+                }
+                throw new RuntimeException("Gave up waiting for service " + 
flt);
+            }
+            return type.cast(svc);
+        } catch (InvalidSyntaxException e) {
+            throw new IllegalArgumentException("Invalid filter", e);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    protected Bundle installBundle(String groupId, String artifactId) throws 
Exception {
+        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId);
+        return bundleContext.installBundle(mvnUrl.getURL());
+    }
+
+    protected Bundle installBundle(String groupId, String artifactId, String 
classifier, String type) throws Exception {
+        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId);
+        return bundleContext.installBundle(mvnUrl.getURL());
+    }
+
+    protected Bundle getInstalledBundle(String symbolicName) {
+        for (Bundle b : bundleContext.getBundles()) {
+            if (b.getSymbolicName().equals(symbolicName)) {
+                return b;
+            }
+        }
+        return null;
+    }
+
+    public static MavenArtifactProvisionOption mavenBundle(String groupId, 
String artifactId) {
+        return mavenBundle(groupId, artifactId, null, null, null);
+    }
+
+    public static MavenArtifactProvisionOption mavenBundle(String groupId, 
String artifactId, String version, String classifier, String type) {
+        MavenArtifactProvisionOption m = 
CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId);
+        if (version != null) {
+            m.version(version);
+        } else {
+            m.versionAsInProject();
+        }
+        if (classifier != null) {
+            m.classifier(classifier);
+        }
+        if (type != null) {
+            m.type(type);
+        }
+        return m;
+    }
+
+    public static String getArtifactVersion( final String groupId, final 
String artifactId ) {
+        final Properties dependencies = new Properties();
+        try {
+            dependencies.load(new FileInputStream(new 
File(System.getProperty("basedir"), 
"target/classes/META-INF/maven/dependencies.properties")));
+            final String version = dependencies.getProperty( groupId + "/" + 
artifactId + "/version" );
+            if( version == null ) {
+                throw new RuntimeException(
+                    "Could not resolve version. Do you have a dependency for " 
+ groupId + "/" + artifactId
+                    + " in your maven project?"
+                );
+            }
+            return version;
+        } catch( IOException e ) {
+            // TODO throw a better exception
+            throw new RuntimeException(
+                "Could not resolve version. Did you configured the plugin in 
your maven project?"
+                + "Or maybe you did not run the maven build and you are using 
an IDE?", e
+            );
+        }
+    }
+
+}

Modified: 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
 (original)
+++ 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
 Wed Sep  2 20:57:02 2009
@@ -17,9 +17,15 @@
 package org.apache.servicemix.jbi.itests;
 
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.List;
+import java.util.Properties;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Enumeration;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -29,86 +35,71 @@
 
 import org.apache.servicemix.jbi.deployer.ServiceAssembly;
 import org.apache.servicemix.jbi.deployer.handler.JBIDeploymentListener;
-import org.apache.servicemix.platform.testing.support.AbstractIntegrationTest;
 import org.apache.servicemix.nmr.api.NMR;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
+import org.junit.runner.RunWith;
+import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.ops4j.pax.exam.CoreOptions.bootClasspathLibrary;
+import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemPackages;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
+...@runwith(JUnit4TestRunner.class)
 public class IntegrationTest extends AbstractIntegrationTest {
 
-    /**
-        * The manifest to use for the "virtual bundle" created
-        * out of the test classes and resources in this project
-        *
-        * This is actually the boilerplate manifest with one additional
-        * import-package added. We should provide a simpler customization
-        * point for such use cases that doesn't require duplication
-        * of the entire manifest...
-        */
-       protected String getManifestLocation() {
-               return "classpath:org/apache/servicemix/MANIFEST.MF";
-       }
-
-       /**
-        * The location of the packaged OSGi bundles to be installed
-        * for this test. Values are Spring resource paths. The bundles
-        * we want to use are part of the same multi-project maven
-        * build as this project is. Hence we use the localMavenArtifact
-        * helper method to find the bundles produced by the package
-        * phase of the maven build (these tests will run after the
-        * packaging phase, in the integration-test phase).
-        *
-        * JUnit, commons-logging, spring-core and the spring OSGi
-        * test bundle are automatically included so do not need
-        * to be specified here.
-        */
-       protected String[] getTestBundlesNames() {
-        return new String[] {
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.stax-api-1.0"),
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jbi-api-1.0"),
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.activation-api-1.1"),
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.javamail-api-1.4"),
-            getBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
-            getBundle("org.apache.felix", "org.apache.felix.prefs"),
-            getBundle("org.apache.xbean", "xbean-classloader"),
-            getBundle("org.apache.felix.karaf.deployer", 
"org.apache.felix.karaf.deployer.filemonitor"),
-            getBundle("org.apache.servicemix", "servicemix-utils"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.api"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.core"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.spring"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.osgi"),
-            getBundle("org.apache.servicemix.document", 
"org.apache.servicemix.document"),
-            getBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.runtime"),
-            getBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.deployer"),
-            getBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.osgi"),
-            getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.ant"),
-            getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.woodstox"),
-            getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.wsdl4j"),
-               };
-       }
-
+    @Test
     public void testJbiComponent() throws Exception {
         System.out.println("Waiting for NMR");
         NMR nmr = getOsgiService(NMR.class);
         assertNotNull(nmr);
-        installJbiBundle("org.apache.servicemix", "servicemix-shared", 
"installer", "zip");
-        installJbiBundle("org.apache.servicemix", "servicemix-eip", 
"installer", "zip");
+
+        Bundle smxShared = installJbiBundle("org.apache.servicemix", 
"servicemix-shared", "installer", "zip");
+        Bundle smxEip = installJbiBundle("org.apache.servicemix", 
"servicemix-eip", "installer", "zip");
+
+        smxShared.start();
+
+        System.err.println("servicemix-shared headers: [");
+        for (Enumeration e = smxShared.getHeaders().keys(); 
e.hasMoreElements();) {
+            Object k = e.nextElement();
+            Object v = smxShared.getHeaders().get(k);
+            System.err.println("\t" + k + " = " + v);
+        }
+        System.err.println("]");
+
+        smxEip.start();
+
         System.out.println("Waiting for JBI Component");
         Component cmp = getOsgiService(Component.class);
         assertNotNull(cmp);
     }
 
+    @Test
     public void testServiceAssembly() throws Throwable {
         System.out.println("Waiting for NMR");
         NMR nmr = getOsgiService(NMR.class);
         assertNotNull(nmr);
-        installJbiBundle("org.apache.servicemix", "servicemix-shared", 
"installer", "zip");
-        installJbiBundle("org.apache.servicemix", "servicemix-jsr181", 
"installer", "zip");
-        installJbiBundle("org.apache.servicemix", "servicemix-http", 
"installer", "zip");
-
-        Thread.sleep(500);
 
+        Bundle smxShared = installJbiBundle("org.apache.servicemix", 
"servicemix-shared", "installer", "zip");
+        Bundle smxJsr181 = installJbiBundle("org.apache.servicemix", 
"servicemix-jsr181", "installer", "zip");
+        Bundle smxHttp = installJbiBundle("org.apache.servicemix", 
"servicemix-http", "installer", "zip");
         Bundle saBundle = 
installJbiBundle("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa", 
null, "zip");
+
+        smxShared.start();
+        smxJsr181.start();
+        smxHttp.start();
+        saBundle.start();
+
         System.out.println("Waiting for JBI Service Assembly");
         ServiceAssembly sa = getOsgiService(ServiceAssembly.class);
         assertNotNull(sa);
@@ -167,12 +158,22 @@
         //sa.shutDown();
     }
 
+    @Test
     public void testJbiLifecycle() throws Exception {
+        System.out.println("Waiting for NMR");
+        NMR nmr = getOsgiService(NMR.class);
+        assertNotNull(nmr);
+
         Bundle smxShared = installJbiBundle("org.apache.servicemix", 
"servicemix-shared", "installer", "zip");
         Bundle smxJsr181 = installJbiBundle("org.apache.servicemix", 
"servicemix-jsr181", "installer", "zip");
         Bundle smxHttp = installJbiBundle("org.apache.servicemix", 
"servicemix-http", "installer", "zip");
-
         Bundle saBundle = 
installJbiBundle("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa", 
null, "zip");
+
+        smxShared.start();
+        smxJsr181.start();
+        smxHttp.start();
+        saBundle.start();
+
         System.out.println("Waiting for JBI Service Assembly");
         ServiceAssembly sa = getOsgiService(ServiceAssembly.class);
         assertNotNull(sa);
@@ -206,13 +207,95 @@
     }
 
     protected Bundle installJbiBundle(String groupId, String artifactId, 
String classifier, String type) throws BundleException {
-        String version = getBundleVersion(groupId, artifactId);
-        File loc = localMavenBundle(groupId, artifactId, version, classifier, 
type);
-        File tmpDir = new File("target/temp/");
-        tmpDir.mkdirs();
-        File out = new JBIDeploymentListener().handle(loc, tmpDir);
-        Bundle bundle = bundleContext.installBundle(out.toURI().toString());
-        bundle.start();
-        return bundle;
+        getOsgiService(org.osgi.service.url.URLStreamHandlerService.class, 
"(url.handler.protocol=jbi)", DEFAULT_TIMEOUT);
+        getOsgiService(org.osgi.service.url.URLStreamHandlerService.class, 
"(url.handler.protocol=mvn)", DEFAULT_TIMEOUT);
+
+        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId, 
getArtifactVersion(groupId, artifactId), classifier, type);
+        return bundleContext.installBundle("jbi:" + mvnUrl.getURL());
+//        String version = getBundleVersion(groupId, artifactId);
+//        File loc = localMavenBundle(groupId, artifactId, version, 
classifier, type);
+//        File tmpDir = new File("target/temp/");
+//        tmpDir.mkdirs();
+//        File out = new JBIDeploymentListener().transform(loc, tmpDir);
+//        Bundle bundle = bundleContext.installBundle(out.toURI().toString());
+//        bundle.start();
+//        return bundle;
     }
+
+    @Configuration
+    public static Option[] configuration() {
+        Option[] options = options(
+            // this is how you set the default log level when using pax 
logging (logProfile)
+            
systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+            systemProperty("basedir").value(System.getProperty("basedir")),
+            systemProperty("karaf.name").value("root"),
+            systemProperty("karaf.home").value("target/karaf.home"),
+            systemProperty("karaf.base").value("target/karaf.home"),
+            systemProperty("karaf.startLocalConsole").value("false"),
+            systemProperty("karaf.startRemoteShell").value("false"),
+
+            // hack system packages
+            systemPackages("org.apache.felix.karaf.main.spi;version=1.0.0", 
"org.apache.felix.karaf.jaas.boot;version=0.9.0"),
+            bootClasspathLibrary(mavenBundle("org.apache.felix.karaf.jaas", 
"org.apache.felix.karaf.jaas.boot")).afterFramework(),
+            bootClasspathLibrary(mavenBundle("org.apache.felix.karaf", 
"org.apache.felix.karaf.main")).afterFramework(),
+            bootClasspathLibrary(mavenBundle("org.apache.geronimo.specs", 
"geronimo-jta_1.1_spec")).beforeFramework(),
+
+            // Log
+            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
+            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
+            // Felix Config Admin
+            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
+            // Blueprint
+            mavenBundle("org.apache.geronimo", "blueprint-bundle"),
+            // Pax mvn handler
+            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
+
+            // Bundles
+            mavenBundle("org.apache.mina", "mina-core"),
+            mavenBundle("org.apache.sshd", "sshd-core"),
+            mavenBundle("org.apache.felix.karaf", 
"org.apache.felix.karaf.management"),
+            mavenBundle("org.apache.felix.karaf.jaas", 
"org.apache.felix.karaf.jaas.config"),
+            mavenBundle("org.apache.felix.gogo", 
"org.apache.felix.gogo.runtime"),
+            mavenBundle("org.apache.felix.karaf.gshell", 
"org.apache.felix.karaf.gshell.console"),
+            mavenBundle("org.apache.felix.karaf.gshell", 
"org.apache.felix.karaf.gshell.osgi"),
+            mavenBundle("org.apache.felix.karaf.gshell", 
"org.apache.felix.karaf.gshell.log").noStart(),
+
+            equinox(),
+
+            // Spring
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.aopalliance"),
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.cglib"),
+            mavenBundle("org.springframework", "spring-core"),
+            mavenBundle("org.springframework", "spring-beans"),
+            mavenBundle("org.springframework", "spring-context"),
+            mavenBundle("org.springframework", "spring-aop"),
+            mavenBundle("org.springframework.osgi", "spring-osgi-core"),
+            mavenBundle("org.springframework.osgi", "spring-osgi-io"),
+            mavenBundle("org.springframework.osgi", "spring-osgi-extender"),
+
+            // Bundles for NMR + JBI
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.ant"),
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.woodstox"),
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.wsdl4j"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.stax-api-1.0"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jbi-api-1.0"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.activation-api-1.1"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.javamail-api-1.4"),
+            mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
+            mavenBundle("org.apache.felix", "org.apache.felix.prefs"),
+            mavenBundle("org.apache.xbean", "xbean-classloader"),
+            mavenBundle("org.apache.felix", "org.apache.felix.fileinstall"),
+            mavenBundle("org.apache.servicemix", "servicemix-utils"),
+            mavenBundle("org.apache.servicemix.document", 
"org.apache.servicemix.document"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.api"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.core"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.spring"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.osgi"),
+            mavenBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.runtime"),
+            mavenBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.deployer"),
+            mavenBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.osgi")
+        );
+        return options;
+    }
+
 }

Modified: 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/ManagementTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/ManagementTest.java?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/ManagementTest.java
 (original)
+++ 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/ManagementTest.java
 Wed Sep  2 20:57:02 2009
@@ -16,71 +16,34 @@
  */
 package org.apache.servicemix.jbi.itests;
 
-import org.apache.servicemix.platform.testing.support.AbstractIntegrationTest;
+import java.io.File;
+
 import org.apache.servicemix.jbi.deployer.AdminCommandsService;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.Option;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.systemPackages;
+import static org.ops4j.pax.exam.CoreOptions.bootClasspathLibrary;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.junit.Assert.fail;
+import org.junit.Test;
 
 public class ManagementTest extends AbstractIntegrationTest {
 
-    /**
-        * The manifest to use for the "virtual bundle" created
-        * out of the test classes and resources in this project
-        *
-        * This is actually the boilerplate manifest with one additional
-        * import-package added. We should provide a simpler customization
-        * point for such use cases that doesn't require duplication
-        * of the entire manifest...
-        */
-       protected String getManifestLocation() {
-               return "classpath:org/apache/servicemix/MANIFEST.MF";
-       }
-
-       /**
-        * The location of the packaged OSGi bundles to be installed
-        * for this test. Values are Spring resource paths. The bundles
-        * we want to use are part of the same multi-project maven
-        * build as this project is. Hence we use the localMavenArtifact
-        * helper method to find the bundles produced by the package
-        * phase of the maven build (these tests will run after the
-        * packaging phase, in the integration-test phase).
-        *
-        * JUnit, commons-logging, spring-core and the spring OSGi
-        * test bundle are automatically included so do not need
-        * to be specified here.
-        */
-       protected String[] getTestBundlesNames() {
-        return new String[] {
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.stax-api-1.0"),
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jbi-api-1.0"),
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.activation-api-1.1"),
-            getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.javamail-api-1.4"),
-            getBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
-            getBundle("org.apache.felix", "org.apache.felix.prefs"),
-            getBundle("org.apache.xbean", "xbean-classloader"),
-            getBundle("org.apache.felix.karaf.deployer", 
"org.apache.felix.karaf.deployer.filemonitor"),
-            getBundle("org.apache.servicemix", "servicemix-utils"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.api"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.core"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.spring"),
-            getBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.osgi"),
-            getBundle("org.apache.servicemix.document", 
"org.apache.servicemix.document"),
-            getBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.runtime"),
-            getBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.deployer"),
-            getBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.osgi"),
-            getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.ant"),
-            getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.woodstox"),
-            getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.wsdl4j"),
-               };
-       }
-
+    @Test
     public void testInstallUninstall() throws Exception {
-        String smxShared = localMavenBundle("org.apache.servicemix", 
"servicemix-shared", getBundleVersion("org.apache.servicemix", 
"servicemix-shared"),
+        String smxShared = localMavenBundle("org.apache.servicemix", 
"servicemix-shared",
+                                            
getArtifactVersion("org.apache.servicemix", "servicemix-shared"),
                                             "installer", "zip").getPath();
-        String smxJsr181 = localMavenBundle("org.apache.servicemix", 
"servicemix-jsr181", getBundleVersion("org.apache.servicemix", 
"servicemix-jsr181"),
-                                            "installer", "zip").getPath();
-        String smxHttp = localMavenBundle("org.apache.servicemix", 
"servicemix-http", getBundleVersion("org.apache.servicemix", "servicemix-http"),
+        String smxJsr181 = localMavenBundle("org.apache.servicemix", 
"servicemix-jsr181",
+                                            
getArtifactVersion("org.apache.servicemix", "servicemix-jsr181"),
                                             "installer", "zip").getPath();
+        String smxHttp = localMavenBundle("org.apache.servicemix", 
"servicemix-http",
+                                          
getArtifactVersion("org.apache.servicemix", "servicemix-http"),
+                                          "installer", "zip").getPath();
         String wsdlFirst = 
localMavenBundle("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa",
-                                            
getBundleVersion("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa"),
+                                            
getArtifactVersion("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa"),
                                             null, "zip").getPath();
 
         AdminCommandsService admin = getAdminCommands();
@@ -137,4 +100,112 @@
         return getOsgiService(AdminCommandsService.class);
     }
 
+    protected File localMavenBundle(String groupId, String artifact, String 
version, String classifier, String type) {
+        String defaultHome = new File(new 
File(System.getProperty("user.home")), ".m2/repository").getAbsolutePath();
+        File repositoryHome = new File(System.getProperty("localRepository", 
defaultHome));
+
+        StringBuffer location = new StringBuffer(groupId.replace('.', '/'));
+        location.append('/');
+        location.append(artifact);
+        location.append('/');
+        location.append(getSnapshot(version));
+        location.append('/');
+        location.append(artifact);
+        location.append('-');
+        location.append(version);
+        if (classifier != null) {
+            location.append('-');
+            location.append(classifier);
+        }
+        location.append(".");
+        location.append(type);
+
+        return new File(repositoryHome, location.toString());
+    }
+
+    protected static String getSnapshot(String version) {
+        if (isTimestamped(version)) {
+            return version.substring(0, version.lastIndexOf('-', 
version.lastIndexOf('-') - 1)) + "-SNAPSHOT";
+        }
+        return version;
+    }
+
+    protected static boolean isTimestamped(String version) {
+        return 
version.matches(".+-\\d\\d\\d\\d\\d\\d\\d\\d\\.\\d\\d\\d\\d\\d\\d-\\d+");
+    }
+
+    @Configuration
+    public static Option[] configuration() {
+        Option[] options = options(
+            // this is how you set the default log level when using pax 
logging (logProfile)
+            
systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+            systemProperty("karaf.name").value("root"),
+            systemProperty("karaf.home").value("target/karaf.home"),
+            systemProperty("karaf.base").value("target/karaf.home"),
+            systemProperty("karaf.startLocalConsole").value("false"),
+            systemProperty("karaf.startRemoteShell").value("false"),
+
+            // hack system packages
+            systemPackages("org.apache.felix.karaf.main.spi;version=1.0.0", 
"org.apache.felix.karaf.jaas.boot;version=0.9.0"),
+            bootClasspathLibrary(mavenBundle("org.apache.felix.karaf.jaas", 
"org.apache.felix.karaf.jaas.boot")).afterFramework(),
+            bootClasspathLibrary(mavenBundle("org.apache.felix.karaf", 
"org.apache.felix.karaf.main")).afterFramework(),
+            bootClasspathLibrary(mavenBundle("org.apache.geronimo.specs", 
"geronimo-jta_1.1_spec")).beforeFramework(),
+
+            // Log
+            mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
+            mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
+            // Felix Config Admin
+            mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
+            // Blueprint
+            mavenBundle("org.apache.geronimo", "blueprint-bundle"),
+            // Pax mvn handler
+            mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
+
+            // Bundles
+            mavenBundle("org.apache.mina", "mina-core"),
+            mavenBundle("org.apache.sshd", "sshd-core"),
+            mavenBundle("org.apache.felix.karaf.jaas", 
"org.apache.felix.karaf.jaas.config"),
+            mavenBundle("org.apache.felix.gogo", 
"org.apache.felix.gogo.runtime"),
+            mavenBundle("org.apache.felix.karaf.gshell", 
"org.apache.felix.karaf.gshell.console"),
+            mavenBundle("org.apache.felix.karaf.gshell", 
"org.apache.felix.karaf.gshell.osgi"),
+            mavenBundle("org.apache.felix.karaf.gshell", 
"org.apache.felix.karaf.gshell.log").noStart(),
+
+            equinox(),
+
+            // Spring
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.aopalliance"),
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.cglib"),
+            mavenBundle("org.springframework", "spring-core"),
+            mavenBundle("org.springframework", "spring-beans"),
+            mavenBundle("org.springframework", "spring-context"),
+            mavenBundle("org.springframework", "spring-aop"),
+            mavenBundle("org.springframework.osgi", "spring-osgi-core"),
+            mavenBundle("org.springframework.osgi", "spring-osgi-io"),
+            mavenBundle("org.springframework.osgi", "spring-osgi-extender"),
+
+            // Bundles for NMR + JBI
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.ant"),
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.woodstox"),
+            mavenBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.wsdl4j"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.stax-api-1.0"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jbi-api-1.0"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.activation-api-1.1"),
+            mavenBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.javamail-api-1.4"),
+            mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
+            mavenBundle("org.apache.felix", "org.apache.felix.prefs"),
+            mavenBundle("org.apache.xbean", "xbean-classloader"),
+            mavenBundle("org.apache.felix", "org.apache.felix.fileinstall"),
+            mavenBundle("org.apache.servicemix", "servicemix-utils"),
+            mavenBundle("org.apache.servicemix.document", 
"org.apache.servicemix.document"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.api"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.core"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.spring"),
+            mavenBundle("org.apache.servicemix.nmr", 
"org.apache.servicemix.nmr.osgi"),
+            mavenBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.runtime"),
+            mavenBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.deployer"),
+            mavenBundle("org.apache.servicemix.jbi", 
"org.apache.servicemix.jbi.osgi")
+        );
+        return options;
+    }
+
 }

Modified: 
servicemix/sandbox/karaf/nmr/jbi/itests/src/test/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/itests/src/test/resources/log4j.properties?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- servicemix/sandbox/karaf/nmr/jbi/itests/src/test/resources/log4j.properties 
(original)
+++ servicemix/sandbox/karaf/nmr/jbi/itests/src/test/resources/log4j.properties 
Wed Sep  2 20:57:02 2009
@@ -16,7 +16,7 @@
 #
 
################################################################################
 
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=TRACE, stdout
 
 #log4j.logger.org.springframework.osgi=DEBUG
 #log4j.logger.org.apache.camel=DEBUG

Modified: servicemix/sandbox/karaf/nmr/jbi/osgi/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/jbi/osgi/pom.xml?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- servicemix/sandbox/karaf/nmr/jbi/osgi/pom.xml (original)
+++ servicemix/sandbox/karaf/nmr/jbi/osgi/pom.xml Wed Sep  2 20:57:02 2009
@@ -65,6 +65,7 @@
                         <Import-Package>
                             javax.jbi.component,
                             javax.management,
+                            javax.management.loading,
                             javax.naming,
                             javax.transaction,
                             
org.apache.geronimo.transaction.manager;resolution:=optional,

Modified: servicemix/sandbox/karaf/nmr/nmr/osgi/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/nmr/osgi/pom.xml?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- servicemix/sandbox/karaf/nmr/nmr/osgi/pom.xml (original)
+++ servicemix/sandbox/karaf/nmr/nmr/osgi/pom.xml Wed Sep  2 20:57:02 2009
@@ -90,6 +90,7 @@
                             org.apache.servicemix.nmr.core,
                             org.apache.servicemix.nmr.core.security,
                             org.apache.servicemix.nmr.osgi,
+                            javax.xml.namespace,
                             *
                         </Import-Package>
                     </instructions>

Modified: servicemix/sandbox/karaf/nmr/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/pom.xml?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- servicemix/sandbox/karaf/nmr/pom.xml (original)
+++ servicemix/sandbox/karaf/nmr/pom.xml Wed Sep  2 20:57:02 2009
@@ -82,6 +82,7 @@
       <felix.prefs.version>1.0.2</felix.prefs.version>
       <felix.karaf.version>0.9.0-SNAPSHOT</felix.karaf.version>
       <felix.fileinstall.version>1.3.0-SNAPSHOT</felix.fileinstall.version>
+      <felix.gogo.version>0.9.0-SNAPSHOT</felix.gogo.version>
       <geronimo.j2ee.connector.version>2.0.0</geronimo.j2ee.connector.version>
       <geronimo.jms.version>1.1.1</geronimo.jms.version>
       <geronimo.jta.version>1.1.1</geronimo.jta.version>
@@ -95,7 +96,10 @@
       <junit.version>3.8.2_1</junit.version>
       <log4j.version>1.2.14</log4j.version>
       <lucene.version>2.4.1</lucene.version>
+      <mina.version>2.0.0-M6</mina.version>
+      <pax.exam.version>1.0.0</pax.exam.version>
       <pax.logging.version>1.4</pax.logging.version>
+      <pax.runner.version>1.1.1</pax.runner.version>
       <servicemix3.version>3.3</servicemix3.version>
       <servicemix.eip.version>2008.01</servicemix.eip.version>
       <servicemix.http.version>2008.01</servicemix.http.version>
@@ -104,6 +108,7 @@
       <servicemix.legal.version>1.0</servicemix.legal.version>
       <servicemix.specs.version>1.3.0</servicemix.specs.version>
       <servicemix.utils.version>1.1.0</servicemix.utils.version>
+      <sshd.version>0.2.0</sshd.version>
       <spring.osgi.version>1.2.0</spring.osgi.version>
       <spring.version>2.5.6.SEC01</spring.version>
       <woodstox.version>3.2.7_1</woodstox.version>
@@ -754,6 +759,31 @@
           <artifactId>servicemix-utils</artifactId>
           <version>${servicemix.utils.version}</version>
       </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <version>${pax.exam.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <version>${pax.exam.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <version>${pax.exam.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit-extender-impl</artifactId>
+            <version>${pax.exam.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.runner</groupId>
+            <artifactId>pax-runner-no-jcl</artifactId>
+            <version>${pax.runner.version}</version>
+        </dependency>
     </dependencies>
   </dependencyManagement>
 

Modified: 
servicemix/sandbox/karaf/nmr/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/AbstractIntegrationTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/sandbox/karaf/nmr/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/AbstractIntegrationTest.java?rev=810698&r1=810697&r2=810698&view=diff
==============================================================================
--- 
servicemix/sandbox/karaf/nmr/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/AbstractIntegrationTest.java
 (original)
+++ 
servicemix/sandbox/karaf/nmr/testing/support/src/main/java/org/apache/servicemix/platform/testing/support/AbstractIntegrationTest.java
 Wed Sep  2 20:57:02 2009
@@ -44,12 +44,12 @@
         try {
             File f = new File("target/smx4");
             f.mkdirs();
-            System.setProperty("servicemix.name", "root");
-            System.setProperty("servicemix.home", f.getAbsolutePath());
-            System.setProperty("servicemix.base", f.getAbsolutePath());
-            System.setProperty("org.apache.servicemix.filemonitor.configDir", 
new File(f, "etc").getAbsolutePath());
-            System.setProperty("org.apache.servicemix.filemonitor.monitorDir", 
new File(f, "deploy").getAbsolutePath());
-            
System.setProperty("org.apache.servicemix.filemonitor.generatedJarDir", new 
File(f, "data/generate-bundles").getAbsolutePath());
+            System.setProperty("karaf.name", "root");
+            System.setProperty("karaf.home", f.getAbsolutePath());
+            System.setProperty("karaf.base", f.getAbsolutePath());
+            System.setProperty("felix.fileinstall.dir", new File(f, 
"etc").getAbsolutePath());
+//            
System.setProperty("org.apache.servicemix.filemonitor.monitorDir", new File(f, 
"deploy").getAbsolutePath());
+//            
System.setProperty("org.apache.servicemix.filemonitor.generatedJarDir", new 
File(f, "data/generate-bundles").getAbsolutePath());
             System.setProperty("bundles.configuration.location", new 
File("src/test/conf").getAbsolutePath());
             System.setProperty("org.osgi.vendor.framework", 
"org.apache.servicemix.platform.testing.support");
             
PropertyConfigurator.configure("target/test-classes/log4j.properties");


Reply via email to