DOSGI-142 DOSGI-86 Fix for problem with discovery, replace spring dm for default...
authorChristian Schneider <cschneider@apache.org>
Fri, 16 Nov 2012 16:48:21 +0000 (16:48 +0000)
committerChristian Schneider <cschneider@apache.org>
Fri, 16 Nov 2012 16:48:21 +0000 (16:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/cxf/dosgi/trunk@1410456 13f79535-47bb-0310-9956-ffa450edef68

27 files changed:
discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarter.java
distribution/multi-bundle/pom.xml
distribution/multi-bundle/src/main/resources/distro_bundles.xml
distribution/multi-bundle/src/main/resources/distro_discovery_bundles.xml
distribution/single-bundle/pom.xml
distribution/single-bundle/src/main/java/org/apache/cxf/dosgi/singlebundle/AggregatedActivator.java
distribution/single-bundle/src/main/java/org/apache/cxf/dosgi/singlebundle/DSWActivator.java [deleted file]
distribution/single-bundle/src/main/java/org/apache/cxf/dosgi/singlebundle/SPIActivator.java
distribution/single-bundle/src/test/java/org/apache/cxf/dosgi/singlebundle/DSWActivatorTest.java [deleted file]
dsw/cxf-dsw/pom.xml
dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
dsw/cxf-dsw/src/main/resources/META-INF/spring/dsw.xml [deleted file]
dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentUtilsTest.java
felix/profiles/pom.xml
parent/pom.xml
systests2/common/pom.xml
systests2/common/src/main/java/org/apache/cxf/dosgi/systests2/common/AbstractTestDiscoveryRoundtrip.java
systests2/multi-bundle/pom.xml
systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java [new file with mode: 0644]
systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryRountrip.java [deleted file]
systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java
systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java
systests2/multi-bundle/src/test/resources/log4j.properties [new file with mode: 0644]

index 67c93ce..1469258 100644 (file)
@@ -147,7 +147,11 @@ public class PublishingEndpointListener implements EndpointListener {
             String path = Util.getZooKeeperPath(name);
             String fullPath = path + '/' + endpointKey;
             LOG.debug("Removing ZooKeeper node: {}", fullPath);
-            zookeeper.delete(fullPath, -1);
+            try {
+                zookeeper.delete(fullPath, -1);
+            } catch (Exception e) {
+                LOG.debug("Error while removing endpoint");
+            }
         }
     }
 
index d9ffbe0..b9e3ee4 100644 (file)
@@ -43,7 +43,7 @@ public class PublishingEndpointListenerFactory implements ServiceFactory {
     private BundleContext bctx;
     private ZooKeeper zookeeper;
     private List<PublishingEndpointListener> listeners = new ArrayList<PublishingEndpointListener>();
-    private ServiceRegistration serviceRegistartion;
+    private ServiceRegistration serviceRegistration;
 
     public PublishingEndpointListenerFactory(ZooKeeper zooKeeper, BundleContext bctx) {
         this.bctx = bctx;
@@ -74,12 +74,12 @@ public class PublishingEndpointListenerFactory implements ServiceFactory {
         Properties props = new Properties();
         props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, "(&(" + Constants.OBJECTCLASS + "=*)("+RemoteConstants.ENDPOINT_FRAMEWORK_UUID+"="+Util.getUUID(bctx)+"))");
         props.put(DISCOVERY_ZOOKEEPER_ID, "true");
-        serviceRegistartion = bctx.registerService(EndpointListener.class.getName(), this, props);
+        serviceRegistration = bctx.registerService(EndpointListener.class.getName(), this, props);
     }
 
     public synchronized void stop() {
-        if (serviceRegistartion != null) {
-            serviceRegistartion.unregister();
+        if (serviceRegistration != null) {
+            serviceRegistration.unregister();
         }
         
         for (PublishingEndpointListener epl : listeners) {
index f3f4df1..91235dc 100644 (file)
@@ -182,7 +182,11 @@ public class ZookeeperStarter implements org.osgi.service.cm.ManagedService {
         }
 
         public void shutdown() {
-            super.shutdown();
+            try {
+                super.shutdown();
+            } catch (Exception e) {
+                LOG.error("Error shutting down zookeeper", e);
+            }
         }
     }
 
index 1941ee9..c3e9d28 100644 (file)
     <topDirectoryLocation>../..</topDirectoryLocation>
   </properties>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-annotation_1.0_spec</artifactId>
-      <version>1.1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-activation_1.1_spec</artifactId>
-      <version>1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-javamail_1.4_spec</artifactId>
-      <version>1.7.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jpa_2.0_spec</artifactId>
-      <version>1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
-      <version>1.1.3</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-servlet_${servlet.version}_spec</artifactId>
-      <version>1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>com.springsource.org.apache.commons.logging</artifactId>
-      <version>1.1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-      <version>2.6</version>
-    </dependency>
-    <dependency>  
-        <groupId>org.slf4j</groupId>  
-        <artifactId>slf4j-api</artifactId>  
-    </dependency>
-    <dependency>  
-        <groupId>org.slf4j</groupId>  
-        <artifactId>slf4j-jcl</artifactId>  
-    </dependency>
-    <dependency>
-      <groupId>org.jdom</groupId>
-      <artifactId>com.springsource.org.jdom</artifactId>
-      <version>1.1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.aopalliance</groupId>
-      <artifactId>com.springsource.org.aopalliance</artifactId>
-      <version>1.0.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-asm</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-expression</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-io</artifactId>
-      <version>${spring.osgi.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-core</artifactId>
-      <version>${spring.osgi.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-extender</artifactId>
-      <version>${spring.osgi.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.web</groupId>
-      <artifactId>pax-web-spi</artifactId>
-      <version>${pax.web.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.web</groupId>
-      <artifactId>pax-web-runtime</artifactId>
-      <version>${pax.web.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-      <version>${jetty.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.web</groupId>
-      <artifactId>pax-web-jetty</artifactId>
-      <version>${pax.web.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.specs</groupId>
-      <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId>
-      <version>${servicemix.specs.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.specs</groupId>
-      <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
-      <version>${servicemix.specs.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.specs</groupId>
-      <artifactId>org.apache.servicemix.specs.jaxb-api-2.2</artifactId>
-      <version>${servicemix.specs.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.specs</groupId>
-      <artifactId>org.apache.servicemix.specs.jaxws-api-2.2</artifactId>
-      <version>${servicemix.specs.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.specs</groupId>
-      <artifactId>org.apache.servicemix.specs.jsr339-api-m10</artifactId>
-      <version>${servicemix.specs.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.ws.xmlschema</groupId>
-      <artifactId>xmlschema-core</artifactId>
-      <version>${xmlschema.bundle.version}</version> 
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId> 
-      <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId> 
-      <version>${xmlresolver.bundle.version}</version> 
-    </dependency>
-    <dependency>
-       <groupId>org.apache.neethi</groupId> 
-       <artifactId>neethi</artifactId> 
-       <version>${neethi.bundle.version}</version> 
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId> 
-      <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId> 
-      <version>${wsdl4j.bundle.version}</version>
-    </dependency>
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId> 
-       <version>${xmlsec.bundle.version}</version>
-    </dependency>  
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId> 
-       <version>${jaxbimpl.bundle.version}</version> 
-    </dependency> 
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-activation_1.1_spec</artifactId>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-javamail_1.4_spec</artifactId>
+            <version>1.7.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <version>1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+            <version>1.1.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_${servlet.version}_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>com.springsource.org.apache.commons.logging</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>com.springsource.org.jdom</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.web</groupId>
+            <artifactId>pax-web-spi</artifactId>
+            <version>${pax.web.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.web</groupId>
+            <artifactId>pax-web-runtime</artifactId>
+            <version>${pax.web.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-api</artifactId>
+            <version>${pax.logging.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+            <version>${pax.logging.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty.aggregate</groupId>
+            <artifactId>jetty-all-server</artifactId>
+            <version>${jetty.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.web</groupId>
+            <artifactId>pax-web-jetty</artifactId>
+            <version>${pax.web.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.specs</groupId>
+            <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId>
+            <version>${servicemix.specs.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.specs</groupId>
+            <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
+            <version>${servicemix.specs.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.specs</groupId>
+            <artifactId>org.apache.servicemix.specs.jaxb-api-2.2</artifactId>
+            <version>${servicemix.specs.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.specs</groupId>
+            <artifactId>org.apache.servicemix.specs.jaxws-api-2.2</artifactId>
+            <version>${servicemix.specs.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.specs</groupId>
+            <artifactId>org.apache.servicemix.specs.jsr339-api-m10</artifactId>
+            <version>${servicemix.specs.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.xmlschema</groupId>
+            <artifactId>xmlschema-core</artifactId>
+            <version>${xmlschema.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
+            <version>${xmlresolver.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.neethi</groupId>
+            <artifactId>neethi</artifactId>
+            <version>${neethi.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
+            <version>${wsdl4j.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.santuario</groupId>
+            <artifactId>xmlsec</artifactId>
+            <version>${xmlsec.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
+            <version>${jaxbimpl.bundle.version}</version>
+        </dependency>
 
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.asm</artifactId> 
-       <version>${asm.bundle.version}</version> 
-    </dependency>
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.commons-pool</artifactId> 
-       <version>${commons.pool.bundle.version}</version> 
-    </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.asm</artifactId>
+            <version>${asm.bundle.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.commons-pool</artifactId>
+            <version>${commons.pool.bundle.version}</version>
+        </dependency>
 
-    <dependency>
-       <groupId>org.codehaus.woodstox</groupId> 
-       <artifactId>stax2-api</artifactId> 
-       <version>3.1.1</version> 
-    </dependency>
-    <dependency>
-       <groupId>org.codehaus.woodstox</groupId> 
-       <artifactId>woodstox-core-asl</artifactId> 
-       <version>${woodstox.bundle.version}</version> 
-    </dependency>
+        <dependency>
+            <groupId>org.codehaus.woodstox</groupId>
+            <artifactId>stax2-api</artifactId>
+            <version>3.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.woodstox</groupId>
+            <artifactId>woodstox-core-asl</artifactId>
+            <version>${woodstox.bundle.version}</version>
+        </dependency>
 
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.joda-time</artifactId>
-       <version>1.5.2_4</version>
-    </dependency>
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.opensaml</artifactId>
-       <version>2.4.1_1</version>
-    </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.joda-time</artifactId>
+            <version>1.5.2_4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.opensaml</artifactId>
+            <version>2.4.1_1</version>
+        </dependency>
 
-    <dependency>
-        <groupId>org.apache.aries</groupId>
-        <artifactId>org.apache.aries.util</artifactId>
-        <version>0.3.1</version>
-    </dependency>   
-    <dependency>
-        <groupId>org.apache.aries.proxy</groupId>
-        <artifactId>org.apache.aries.proxy</artifactId>
-        <version>0.3.1</version>
-    </dependency>    
-    <dependency>
-        <groupId>org.apache.aries.blueprint</groupId>
-        <artifactId>org.apache.aries.blueprint</artifactId>
-        <version>0.3.2</version>
-    </dependency>
+        <dependency>
+            <groupId>org.apache.aries</groupId>
+            <artifactId>org.apache.aries.util</artifactId>
+            <version>0.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy</artifactId>
+            <version>0.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint</artifactId>
+            <version>0.3.2</version>
+        </dependency>
 
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-api</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-core</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-frontend-simple</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-frontend-jaxws</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-bindings-xml</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-bindings-soap</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-databinding-jaxb</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-databinding-aegis</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-        <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-ws-policy</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-transports-http</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-transports-http-jetty</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-rs-extension-providers</artifactId>
-        <version>${cxf.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-bundle-compatible</artifactId>
-      <version>${cxf.version}</version>
-    </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-api</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-core</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-bindings-xml</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-bindings-soap</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-databinding-jaxb</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-databinding-aegis</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-extension-providers</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-bundle-compatible</artifactId>
+            <version>${cxf.version}</version>
+            <!-- <exclusions> <exclusion> <groupId>org.apache.cxf</groupId> 
+                <artifactId>cxf-rt-transports-jms</artifactId> </exclusion> </exclusions> -->
+        </dependency>
 
-    <dependency>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-discovery-local</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-dsw-cxf</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-topology-manager</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-ri-discovery-local</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-ri-dsw-cxf</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-ri-topology-manager</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
-    <!-- Discovery dependencies -->
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.configadmin</artifactId>
-      <version>1.2.8</version>
-    </dependency>      
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.fileinstall</artifactId>
-      <version>3.1.10</version>
-    </dependency>      
+        <!-- Discovery dependencies -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.2.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.fileinstall</artifactId>
+            <version>3.1.10</version>
+        </dependency>
 
-    <dependency> 
-      <groupId>org.apache.log4j</groupId> 
-      <artifactId>com.springsource.org.apache.log4j</artifactId> 
-      <version>${log4j.version}</version>
-    </dependency>
-    <dependency>
+        <dependency>
+            <groupId>org.apache.log4j</groupId>
+            <artifactId>com.springsource.org.apache.log4j</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.zookeeper</groupId>
             <artifactId>zookeeper</artifactId>
             <version>${zookeeper.version}</version>
             <exclusions>
                 <exclusion>
-                   <groupId>com.sun.jdmk</groupId>
-                   <artifactId>jmxtools</artifactId> 
+                    <groupId>com.sun.jdmk</groupId>
+                    <artifactId>jmxtools</artifactId>
                 </exclusion>
                 <exclusion>
-                   <groupId>com.sun.jmx</groupId>
-                   <artifactId>jmxri</artifactId> 
+                    <groupId>com.sun.jmx</groupId>
+                    <artifactId>jmxri</artifactId>
                 </exclusion>
                 <exclusion>
-                   <groupId>log4j</groupId>
-                   <artifactId>log4j</artifactId> 
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
                 </exclusion>
             </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-discovery-distributed</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-       <groupId>org.osgi</groupId>
-       <artifactId>org.osgi.enterprise</artifactId>
-       <version>${osgi.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf.dosgi</groupId>
-        <artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-server</artifactId>
-        <version>${project.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf.dosgi</groupId>
-        <artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-server-config</artifactId>
-        <version>${project.version}</version>
-    </dependency>
-    
-  </dependencies>        
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-ri-discovery-distributed</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.enterprise</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-server</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-server-config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>        
   
 
   <build>
                 
                 <xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/distribution_configs/felix.discovery.config.properties.append" style="src/main/xsl/felix_distro_config.xslt">
                     <param name="Version" expression="${dosgi.version}" />
-                    <param name="Offset" expression="100" />
+                    <param name="Offset" expression="120" />
                 </xslt>
                 
                 <xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/felix.discovery.config.properties.append" style="src/main/xsl/felix_buildsystem_config.xslt">
                       <param name="TargetDir" expression="${current.dir}/target/" />
-                      <param name="Offset" expression="100" />
+                      <param name="Offset" expression="120" />
                 </xslt>
                 
                 <xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/distribution_configs/equinox.discovery.config.ini.append" style="src/main/xsl/equinox_distro_config.xslt">
index 3a9e102..a45ad60 100644 (file)
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/commons-lang-2.6.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-core-${spring.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-beans-${spring.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-context-${spring.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/com.springsource.org.aopalliance-1.0.0.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/slf4j-api-${slf4j.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/slf4j-jcl-${slf4j.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-aop-${spring.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-asm-${spring.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-expression-${spring.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-osgi-io-${spring.osgi.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-osgi-core-${spring.osgi.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-osgi-extender-${spring.osgi.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/jetty-all-server-${jetty.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-spi-${pax.web.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-runtime-${pax.web.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-jetty-${pax.web.version}.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-logging-api-${pax.logging.version}.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-logging-service-${pax.logging.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.jaxb-impl-${jaxbimpl.bundle.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.wsdl4j-${wsdl4j.bundle.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.xmlsec-${xmlsec.bundle.version}.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/xmlsec-${xmlsec.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/xmlschema-core-${xmlschema.bundle.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.asm-${asm.bundle.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.xmlresolver-${xmlresolver.bundle.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.util-0.3.1.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.proxy-0.3.1.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.blueprint-0.3.2.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.osgi.enterprise-${osgi.version}.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.felix.configadmin-1.2.8.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.felix.fileinstall-3.1.10.jar</bundle>
 
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-api-${cxf.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-core-${cxf.version}.jar</bundle>
-
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-frontend-simple-${cxf.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-frontend-jaxws-${cxf.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-frontend-jaxrs-${cxf.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-transports-http-jetty-${cxf.version}.jar</bundle>  
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-ws-policy-${cxf.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-rs-extension-providers-${cxf.version}.jar</bundle>
-  
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-bundle-compatible-${cxf.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-local-${project.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.osgi.enterprise-${osgi.version}.jar</bundle>
+  
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-dsw-cxf-${project.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-topology-manager-${project.version}.jar</bundle>
-  
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-local-${project.version}.jar</bundle>  
 </bundles>
index 73fb0bf..ac41a90 100644 (file)
@@ -1,10 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <bundles>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.felix.configadmin-1.2.8.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.felix.fileinstall-3.1.10.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/com.springsource.org.apache.log4j-${log4j.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/zookeeper-${zookeeper.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-distributed-${project.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-distributed-zookeeper-server-${project.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-distributed-zookeeper-server-config-${project.version}.jar</bundle>
 </bundles>
index d5001e3..6c9afeb 100644 (file)
       <version>1.1.0</version>
     </dependency>
     <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.aopalliance</groupId>
-      <artifactId>com.springsource.org.aopalliance</artifactId>
-      <version>1.0.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-asm</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-expression</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-io</artifactId>
-      <version>${spring.osgi.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-core</artifactId>
-      <version>${spring.osgi.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-extender</artifactId>
-      <version>${spring.osgi.version}</version>
-    </dependency>
-    <dependency>
       <groupId>org.ops4j.pax.web</groupId>
       <artifactId>pax-web-runtime</artifactId>
       <version>${pax.web.version}</version>
       <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId> 
       <version>${wsdl4j.bundle.version}</version>
     </dependency>
-    <dependency>
-       <groupId>org.apache.servicemix.bundles</groupId> 
-       <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId> 
-       <version>${xmlsec.bundle.version}</version>
-    </dependency>  
+        <dependency>
+            <groupId>org.apache.santuario</groupId>
+            <artifactId>xmlsec</artifactId>
+            <version>${xmlsec.version}</version>
+        </dependency> 
     <dependency>
        <groupId>org.apache.servicemix.bundles</groupId> 
        <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId> 
       <artifactId>commons-lang</artifactId>
       <version>2.6</version>
     </dependency>
+    
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-api</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-core</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-frontend-simple</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-frontend-jaxws</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-bindings-xml</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-bindings-soap</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-databinding-jaxb</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-databinding-aegis</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+        <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-ws-policy</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-transports-http</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-transports-http-jetty</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-rt-rs-extension-providers</artifactId>
+        <version>${cxf.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-bundle-minimal</artifactId>
+      <artifactId>cxf-bundle-compatible</artifactId>
       <version>${cxf.version}</version>
+      <exclusions>
+        <exclusion>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-jms</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>
index de74bc2..ea2ff2c 100644 (file)
@@ -28,6 +28,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.cxf.dosgi.dsw.Activator;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
@@ -126,9 +127,6 @@ public class AggregatedActivator implements BundleActivator {
             sba.start(ctx);
             activators.add(sba);
             
-            DSWActivator dsw = new DSWActivator();
-            dsw.start(ctx);
-            activators.add(dsw);
         } finally {
             Thread.currentThread().setContextClassLoader(oldClassLoader);
         }
diff --git a/distribution/single-bundle/src/main/java/org/apache/cxf/dosgi/singlebundle/DSWActivator.java b/distribution/single-bundle/src/main/java/org/apache/cxf/dosgi/singlebundle/DSWActivator.java
deleted file mode 100644 (file)
index 20d143a..0000000
+++ /dev/null
@@ -1,48 +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.cxf.dosgi.singlebundle;
-
-import org.apache.cxf.dosgi.dsw.Activator;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/*
- * Starts the DSW in the singlebundle distribution 
- * which would normally be done by the Spring OSGi Extender
- * */
-public class DSWActivator implements BundleActivator {
-
-    private Activator dsw;
-
-    public void start(BundleContext ctx) throws Exception {
-        dsw = createActivator();
-        dsw.setBundleContext(ctx);
-        dsw.start();
-    }
-
-    public void stop(BundleContext ctx) throws Exception {
-        dsw.stop();
-    }
-
-    // separated for test case
-    protected Activator createActivator() {
-        return new Activator();
-    }
-
-}
index 80e912d..a410a78 100644 (file)
@@ -38,8 +38,6 @@ import org.osgi.framework.BundleEvent;
 import org.osgi.framework.SynchronousBundleListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.core.io.Resource;
-import org.springframework.osgi.io.OsgiBundleResourcePatternResolver;
 
 public class SPIActivator implements BundleActivator, SynchronousBundleListener {
     private static final Logger LOG = LoggerFactory.getLogger(SPIActivator.class);
@@ -67,14 +65,14 @@ public class SPIActivator implements BundleActivator, SynchronousBundleListener
         Map<String, Callable<Class>> map = factories.get(bundle.getBundleId());
 
         Vector<URL> v = new Vector<URL>();
-        try {
-            Resource[] resources = new OsgiBundleResourcePatternResolver(bundle).getResources("classpath*:META-INF/services/*");
-            for (Resource r : resources) {
-                v.add(r.getURL());
-            }
-        } catch (IOException e1) {
-            LOG.error("Failed to resolve service resources", e1);
-        }
+//        try {
+//            Resource[] resources = bundle.getResources("classpath*:META-INF/services/*");
+//            for (Resource r : resources) {
+//                v.add(r.getURL());
+//            }
+//        } catch (IOException e1) {
+//            LOG.error("Failed to resolve service resources", e1);
+//        }
 
         Enumeration<URL> e = v.elements();
         if (e != null) {
diff --git a/distribution/single-bundle/src/test/java/org/apache/cxf/dosgi/singlebundle/DSWActivatorTest.java b/distribution/single-bundle/src/test/java/org/apache/cxf/dosgi/singlebundle/DSWActivatorTest.java
deleted file mode 100644 (file)
index e776909..0000000
+++ /dev/null
@@ -1,66 +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.cxf.dosgi.singlebundle;
-
-import junit.framework.TestCase;
-
-import org.apache.cxf.dosgi.dsw.Activator;
-import org.easymock.classextension.EasyMock;
-import org.osgi.framework.BundleContext;
-
-public class DSWActivatorTest extends TestCase {
-
-    public void testStartStop() throws Exception{
-
-        BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
-        final Activator a = EasyMock.createNiceMock(Activator.class);
-        
-        a.setBundleContext(bc);
-        EasyMock.expectLastCall().atLeastOnce();
-        
-        a.start();
-        EasyMock.expectLastCall().once();
-                
-        EasyMock.replay(bc);
-        EasyMock.replay(a);
-        
-        DSWActivator da = new DSWActivator(){
-            protected org.apache.cxf.dosgi.dsw.Activator createActivator() {
-                return a;
-            };
-        };
-        
-        da.start(bc);
-        
-        EasyMock.verify(a);
-        EasyMock.reset(a);
-        
-        a.stop();
-        EasyMock.expectLastCall().once();
-
-        EasyMock.replay(a);
-        
-        da.stop(bc);
-        
-        EasyMock.verify(a);
-        EasyMock.verify(bc);
-        
-    }
-    
-}
index 86377f0..30ae437 100644 (file)
             <artifactId>easymockclassextension</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.springframework.osgi</groupId>
-            <artifactId>spring-osgi-core</artifactId>
-            <version>${spring.osgi.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-
     </dependencies>
 
     <build>
                         <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
                         <Import-Package>${bundle.import.package}</Import-Package>
                         <Export-Package>${bundle.export.package}</Export-Package>
+                        <Bundle-Activator>org.apache.cxf.dosgi.dsw.Activator</Bundle-Activator>
                         <DynamicImport-Package>*</DynamicImport-Package>
-                        <Spring-Context>META-INF/spring/*.xml;create-asynchrously:=false</Spring-Context>
                     </instructions>
                 </configuration>
             </plugin>
index e14ffdc..7a1c334 100644 (file)
@@ -28,6 +28,7 @@ import org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorImpl;
 import org.apache.cxf.dosgi.dsw.qos.IntentMap;
 import org.apache.cxf.dosgi.dsw.qos.IntentUtils;
 import org.apache.cxf.dosgi.dsw.service.RemoteServiceadminFactory;
+import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -36,36 +37,33 @@ import org.osgi.service.cm.ManagedService;
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.osgi.context.BundleContextAware;
-
 
 // registered as spring bean -> start / stop called accordingly 
-public class Activator implements ManagedService,BundleContextAware {
+public class Activator implements ManagedService, BundleActivator {
 
     private final static Logger LOG = LoggerFactory.getLogger(Activator.class);
 
     private static final String CONFIG_SERVICE_PID = "cxf-dsw";
-    private BundleContext bc;
 
     private ServiceRegistration rsaFactoryReg;
 
     private ServiceRegistration decoratorReg;
 
-    public synchronized void start() {
+    public void start(BundleContext bc) throws Exception {
         // Disable the fast infoset as it's not compatible (yet) with OSGi
         System.setProperty("org.apache.cxf.nofastinfoset", "true");
 
         // should we have a seperate PID for a find and publish hook ?
         // context.registerService(ManagedService.class.getName(), this, getDefaults());
 
-        registerRemoteServiceAdminService();
+        registerRemoteServiceAdminService(bc);
 
         decoratorReg = bc.registerService(ServiceDecorator.class.getName(), new ServiceDecoratorImpl(bc),
                                           null);
 
     }
 
-    private RemoteServiceadminFactory registerRemoteServiceAdminService() {
+    private RemoteServiceadminFactory registerRemoteServiceAdminService(BundleContext bc) {
        IntentMap intentMap = IntentUtils.getIntentMap(bc);
         RemoteServiceadminFactory rsaf = new RemoteServiceadminFactory(bc, intentMap);
         Hashtable<String, Object> props = new Hashtable<String, Object>();
@@ -93,7 +91,7 @@ public class Activator implements ManagedService,BundleContextAware {
         return rsaf;
     }
 
-    public void stop() {
+    public void stop(BundleContext context) throws Exception {
         LOG.debug("RemoteServiceAdmin Implementation is shutting down now");
         
         // This also triggers the unimport and unexport of the remote services
@@ -117,8 +115,4 @@ public class Activator implements ManagedService,BundleContextAware {
         }
     }
 
-    public void setBundleContext(BundleContext bundleContext) {
-        bc = bundleContext;
-    }
-
 }
index 3795b4c..9ebe812 100644 (file)
@@ -5,23 +5,15 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
 import org.apache.cxf.dosgi.dsw.util.Utils;
-import org.apache.cxf.ws.policy.spring.PolicyNamespaceHandler;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
 
 public class IntentUtils {
     private static final Logger LOG = LoggerFactory.getLogger(IntentUtils.class);
 
-    private static final String[] INTENT_MAP = {
-        "/OSGI-INF/cxf/intents/intent-map.xml"
-    };
-
     public static String formatIntents(String[] intents) {
         StringBuilder sb = new StringBuilder();
         boolean first = true;
@@ -56,39 +48,10 @@ public class IntentUtils {
         return im;
     }
 
+    
+    
     public static IntentMap readIntentMap(BundleContext bundleContext) {
-        List<String> springIntentLocations = new ArrayList<String>();
-        for (String mapFile : INTENT_MAP) {
-            if (bundleContext.getBundle().getResource(mapFile) == null) {
-                OsgiUtils.LOG.info("Could not find intent map file " + mapFile);
-                return null;
-            }
-            springIntentLocations.add("classpath:" + mapFile);
-        }
-
-        // switch to cxf bundle classloader for spring
-        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader(PolicyNamespaceHandler.class.getClassLoader());
-
-        LOG.debug("Loading Intent map from {}", springIntentLocations);
-        OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(springIntentLocations.toArray(new String[] {})) {
-            @Override
-            protected void initBeanDefinitionReader(XmlBeanDefinitionReader pBeanDefinitionReader) {
-                super.initBeanDefinitionReader(pBeanDefinitionReader);
-                pBeanDefinitionReader.setValidating(false);
-            }
-        };
-        ctx.setPublishContextAsService(false);
-        ctx.setBundleContext(bundleContext);
-        ctx.refresh();
-        LOG.debug("application context: {}", ctx);
-        IntentMap im = (IntentMap) ctx.getBean("intentMap");
-        LOG.debug("retrieved intent map: {}", im);
-
-        Thread.currentThread().setContextClassLoader(oldClassLoader);
-
-        return im;
-
+        return new DefaultIntentMapFactory().create();
     }
 
     @SuppressWarnings("rawtypes")
diff --git a/dsw/cxf-dsw/src/main/resources/META-INF/spring/dsw.xml b/dsw/cxf-dsw/src/main/resources/META-INF/spring/dsw.xml
deleted file mode 100644 (file)
index 92d3086..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-  
-  <!--
-       The spring config is currently needed as dsw loads the intent file using spring and we need to make sure the spring extender is loaded at this point.
-       See https://issues.apache.org/jira/browse/DOSGI-66 
-   -->
-  <bean name="dsw" class="org.apache.cxf.dosgi.dsw.Activator"
-        init-method="start" 
-        destroy-method="stop" 
-  />
-</beans>
index 8b743e6..abdfdc4 100644 (file)
@@ -50,8 +50,7 @@ public class ActivatorTest extends TestCase{
         
         control.replay();
         Activator a = new Activator();
-        a.setBundleContext(bc);
-        a.start();
+        a.start(bc);
         control.verify();
     }
     
index cccee5f..888efbb 100644 (file)
@@ -1,19 +1,14 @@
 package org.apache.cxf.dosgi.dsw.qos;
 
-import java.io.IOException;
 import java.util.Arrays;
 
 import junit.framework.Assert;
 
 import org.easymock.EasyMock;
-import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.InvalidSyntaxException;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class IntentUtilsTest {
-    private static final String INTENT_MAP_URL = "/OSGI-INF/cxf/intents/intent-map.xml";
     
     public void testNoIntentMap() {
         Bundle b = EasyMock.createNiceMock(Bundle.class);
@@ -36,14 +31,4 @@ public class IntentUtilsTest {
         Assert.assertEquals(initial, IntentUtils.formatIntents(actual));
     }
 
-    @Test
-    public void testgetIntentMap() throws IOException, ClassNotFoundException, InvalidSyntaxException {
-        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(INTENT_MAP_URL);
-        IntentMap intentMap = (IntentMap) ctx.getBean("intentMap", IntentMap.class);
-        Assert.assertEquals(6, intentMap.getIntents().size());
-        
-        IntentMap intentMap2 = new DefaultIntentMapFactory().create();
-        Object soap11_1 = intentMap.getIntents().get("addressing");
-        Object soap11_2 = intentMap2.getIntents().get("addressing");
-    }
 }
index 5d8869f..409c1de 100644 (file)
           <version>${wsdl4j.bundle.version}</version>
         </dependency>
         <dependency>
-          <groupId>org.apache.servicemix.bundles</groupId> 
-          <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId> 
-          <version>${xmlsec.bundle.version}</version>
+            <groupId>org.apache.santuario</groupId>
+            <artifactId>xmlsec</artifactId>
+            <version>${xmlsec.version}</version>
         </dependency>
 
         <dependency>
index 05b9915..0605d0f 100644 (file)
         <remote.service.admin.interfaces.version>1.0.0</remote.service.admin.interfaces.version>
 
         <servicemix.specs.version>2.1.0</servicemix.specs.version>
-        <pax.web.version>1.0.3</pax.web.version>
+        <pax.web.version>1.0.11</pax.web.version>
+        <pax.logging.version>1.1.1</pax.logging.version>
         <servlet.version>3.0</servlet.version>
         <log4j.version>1.2.15</log4j.version>
         <jetty.version>7.4.2.v20110526</jetty.version>
-        <xmlschema.bundle.version>2.0.1</xmlschema.bundle.version>
-        <xmlresolver.bundle.version>1.2_4</xmlresolver.bundle.version>          
-        <neethi.bundle.version>3.0.1</neethi.bundle.version>
-        <wsdl4j.bundle.version>1.6.2_5</wsdl4j.bundle.version> <!-- CXF uses 1.6.2 -->
-        <xmlsec.bundle.version>1.4.5_1</xmlsec.bundle.version>
-        <asm.bundle.version>3.3_2</asm.bundle.version> 
+        <xmlschema.bundle.version>2.0.3</xmlschema.bundle.version>
+        <xmlresolver.bundle.version>1.2_5</xmlresolver.bundle.version>          
+        <neethi.bundle.version>3.0.2</neethi.bundle.version>
+        <wsdl4j.bundle.version>1.6.2_6</wsdl4j.bundle.version>
+        <xmlsec.version>1.5.3</xmlsec.version>
+        <asm.bundle.version>3.3.1_1</asm.bundle.version> 
         <commons.pool.bundle.version>1.5.4_1</commons.pool.bundle.version>
-        <woodstox.bundle.version>4.1.1</woodstox.bundle.version> <!-- CXF 2.4.1 uses 4.1.1 -->
-        <jaxbimpl.bundle.version>2.1.13_2</jaxbimpl.bundle.version> <!-- CXF 2.4.1 uses 2.1.13_2 -->
-        <slf4j.version>1.6.2</slf4j.version>
-
+        <woodstox.bundle.version>4.1.4</woodstox.bundle.version>
+        <jaxbimpl.bundle.version>2.2.1.1_2</jaxbimpl.bundle.version>
+        <slf4j.version>1.6.4</slf4j.version>
         <felix.plugin.version>2.3.4</felix.plugin.version>
+        <exam.version>2.6.0</exam.version>
     </properties>
 
     <dependencyManagement>
index 954e1ca..233028a 100644 (file)
@@ -38,7 +38,6 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.enterprise</artifactId>
-            <version>${osgi.version}</version>
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.swissbox</groupId>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-bundle-minimal</artifactId>
+            <artifactId>cxf-rt-core</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-databinding-aegis</artifactId>
             <version>${cxf.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf.dosgi.samples</groupId>
             <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf.dosgi.samples</groupId>
             <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
         </dependency>
 
         <dependency>
index d9c0045..fe23933 100644 (file)
@@ -20,7 +20,6 @@ package org.apache.cxf.dosgi.systests2.common;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.ServerSocket;
 import java.util.Hashtable;
 
 import org.apache.cxf.dosgi.systests2.common.test2.Test2Service;
@@ -28,18 +27,13 @@ import org.apache.cxf.dosgi.systests2.common.test2.client.ClientActivator;
 import org.apache.cxf.dosgi.systests2.common.test2.client.Test2ServiceTracker;
 import org.apache.cxf.dosgi.systests2.common.test2.server.ServerActivator;
 import org.apache.cxf.dosgi.systests2.common.test2.server.Test2ServiceImpl;
-import org.junit.Assert;
 import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
-import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.util.tracker.ServiceTracker;
 
 public abstract class AbstractTestDiscoveryRoundtrip {
-    protected abstract BundleContext getBundleContext(); 
-
     protected static InputStream getClientBundle() {
         return TinyBundles.newBundle()
             .add(ClientActivator.class)
@@ -60,86 +54,33 @@ public abstract class AbstractTestDiscoveryRoundtrip {
             .build(TinyBundles.withBnd());
     }
 
-    public void baseTestDiscoveryRoundtrip() throws Exception {
-        // This test works as follows.
-        // 1. It loads the zookeeper server as a bundle and configures it and the client to
-        //    it with a free port number to set up the zookeeper discovery infrastructure.
-        //    This is done through the Configuration Admin Service.
-        // 2. It has a server bundle and a client bundle. The server bundle exposes Test2Service
-        //    on a dynamically allocated port. The service method returns a stack trace from the 
-        //    server in string format.
-        // 3. The client bundle is simply a client to an OSGi Service implementing the Test2Service.
-        //    It has the additional requirement that the service needs to have the service.imported 
-        //    property set on the service reference. This is needed to for the lookup of a proxy to
-        //    a remote service.
-        // 4. The client will automatically get a proxy to the remote service through the discovery
-        //    system.
-        // 5. The client invokes the remote service and registers a service when the invocation 
-        //    returns. It puts the return value (the remote stack trace) on that service as a 
-        //    'result' property
-        // 6. The test code waits for this service to appear and then checks:
-        //    * That the stack trace doesn't contain the client package (so no direct invocation)
-        //    * That the stack trace contains the CXF transport and interceptor packages
-        
-        for( Bundle b : getBundleContext().getBundles() )
-        {
-            System.out.println( "*** Bundle " + b.getBundleId() + " : " + b.getSymbolicName() + "/" + b.getState());
-        }
-        
-        // Find a free port to run the Zookeeper Server on
-        final int zkPort = new ServerSocket(0).getLocalPort();
+    protected void configureZookeeper(ConfigurationAdmin configAdmin, int zkPort) throws IOException {
         System.out.println("*** Port for Zookeeper Server: " + zkPort);
-
-        ServiceTracker st = null;
-        try {
-            st = new ServiceTracker(getBundleContext(), ConfigurationAdmin.class.getName(), null) {
-                @Override
-                public Object addingService(ServiceReference reference) {
-                    Object svc = super.addingService(reference);
-                    if (svc instanceof ConfigurationAdmin) {
-                        try {
-                            ConfigurationAdmin cadmin = (ConfigurationAdmin) svc;
-                            org.osgi.service.cm.Configuration zkServerCfg = 
-                                cadmin.getConfiguration("org.apache.cxf.dosgi.discovery.zookeeper.server", null);
-                            Hashtable<String, Object> svrProps = new Hashtable<String, Object>();
-                            svrProps.put("clientPort", zkPort);
-                            zkServerCfg.update(svrProps);                            
-                            
-                            org.osgi.service.cm.Configuration zkClientCfg = 
-                                cadmin.getConfiguration("org.apache.cxf.dosgi.discovery.zookeeper", null);
-                            Hashtable<String, Object> cliProps = new Hashtable<String, Object>();
-                            cliProps.put("zookeeper.host", "127.0.0.1");
-                            cliProps.put("zookeeper.port", "" + zkPort);
-                            zkClientCfg.update(cliProps);
-                        } catch (IOException e) {
-                            e.printStackTrace();
-                        }
-                    }
-                    return svc;
-                }            
-            };
-            st.open();
-                                
-            ServiceReference ref = waitService(String.class.getName(), "(testResult=test2)");
-            String trace = (String) ref.getProperty("result");
-            Assert.assertFalse("Stack trace must not contain client packages. " +
-                "Invocation should go through the protocol stack. " +
-                "It should not be directly invoked. " + trace,
-                trace.contains("org.apache.cxf.dosgi.systests2.common.test2.client"));
-            
-            // If gone through the protocol stack the following packages should be 
-            // in there:
-            Assert.assertTrue(trace.contains("org.apache.cxf.transport"));
-            Assert.assertTrue(trace.contains("org.apache.cxf.interceptor"));
-        } finally {
-            st.close();
-        }        
+        updateZkServerConfig(zkPort, configAdmin);                            
+        updateZkClientConfig(zkPort, configAdmin);
     }
     
-    private ServiceReference waitService(String cls, String filter) throws Exception {        
+    protected void updateZkClientConfig(final int zkPort, ConfigurationAdmin cadmin) throws IOException {
+        org.osgi.service.cm.Configuration zkClientCfg = 
+            cadmin.getConfiguration("org.apache.cxf.dosgi.discovery.zookeeper", null);
+        Hashtable<String, Object> cliProps = new Hashtable<String, Object>();
+        cliProps.put("zookeeper.host", "127.0.0.1");
+        cliProps.put("zookeeper.port", "" + zkPort);
+        zkClientCfg.update(cliProps);
+    }
+
+    protected void updateZkServerConfig(final int zkPort, ConfigurationAdmin cadmin) throws IOException {
+        org.osgi.service.cm.Configuration zkServerCfg = 
+            cadmin.getConfiguration("org.apache.cxf.dosgi.discovery.zookeeper.server", null);
+        Hashtable<String, Object> svrProps = new Hashtable<String, Object>();
+        svrProps.put("clientPort", zkPort);
+        zkServerCfg.update(svrProps);
+    }            
+    
+    protected ServiceReference waitService(BundleContext bc, Class<?> cls, String filter) throws Exception {        
         ServiceReference[] refs = null;
         for (int i=0; i < 60; i++) {
-            refs = getBundleContext().getServiceReferences(cls, filter);
+            refs = bc.getServiceReferences(cls.getName(), filter);
             if (refs != null && refs.length > 0) {
                 return refs[0];
             }
@@ -147,5 +88,5 @@ public abstract class AbstractTestDiscoveryRoundtrip {
             Thread.sleep(1000);
         }
         throw new Exception("Service not found: " + cls + filter);
-    }    
+    }
 }
index 9cf7fee..135effb 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0' encoding='UTF-8' ?>
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
     <packaging>jar</packaging>
 
     <name>Distributed OSGi System Tests Multi-Bundle</name>
-    
+
     <properties>
         <!-- this is temporary! -->
-        <!--
-        <maven.test.skip>true</maven.test.skip>
-        -->
+        <!-- <maven.test.skip>true</maven.test.skip> -->
     </properties>
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam</artifactId>
-            <version>1.2.4</version>
+            <artifactId>pax-exam-junit4</artifactId>
+            <version>${exam.version}</version>
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-junit</artifactId>
-            <version>1.2.4</version>
+            <artifactId>pax-exam-inject</artifactId>
+            <version>${exam.version}</version>
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-default</artifactId>
-            <version>1.2.4</version>
+            <artifactId>pax-exam-container-native</artifactId>
+            <version>${exam.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-link-mvn</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>1.5.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>3.2.2</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.ops4j.pax.swissbox</groupId>
             <artifactId>pax-swissbox-tinybundles</artifactId>
             <version>1.3.1</version>
             <artifactId>cxf-rt-core</artifactId>
             <version>${cxf.version}</version>
         </dependency>
-        <dependency> 
-            <groupId>org.apache.log4j</groupId> 
-            <artifactId>com.springsource.org.apache.log4j</artifactId> 
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-bindings-soap</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.log4j</groupId>
+            <artifactId>com.springsource.org.apache.log4j</artifactId>
             <version>${log4j.version}</version>
             <scope>test</scope>
         </dependency>
             <version>${zookeeper.version}</version>
             <exclusions>
                 <exclusion>
-                   <groupId>com.sun.jdmk</groupId>
-                   <artifactId>jmxtools</artifactId> 
+                    <groupId>com.sun.jdmk</groupId>
+                    <artifactId>jmxtools</artifactId>
                 </exclusion>
                 <exclusion>
-                   <groupId>com.sun.jmx</groupId>
-                   <artifactId>jmxri</artifactId> 
+                    <groupId>com.sun.jmx</groupId>
+                    <artifactId>jmxri</artifactId>
                 </exclusion>
                 <exclusion>
-                   <groupId>log4j</groupId>
-                   <artifactId>log4j</artifactId> 
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
             <groupId>org.apache.cxf.dosgi</groupId>
             <artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-server</artifactId>
             <version>${project.version}</version>
-            <scope>test</scope>           
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf.dosgi.samples</groupId>
         </dependency>
 
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1.1</version>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-jcl</artifactId>
-            <scope>test</scope>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.6.1</version>
         </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency> 
     </dependencies>
 
     <build>
         <plugins>
             <!-- use pax exam maven plugin -->
 
-            <!--
-            Note: settings and dependencies for the final osgi runtime (TESTS) are just used in TestCases
-            that annotated with this:
-            @RunWith( MavenConfiguredJUnit4TestRunner.class )
-
-            All other testcases will use their own settings/provisioning inside @Configure Methods.
-            -->
+            <!-- Note: settings and dependencies for the final osgi runtime 
+                (TESTS) are just used in TestCases that annotated with this: @RunWith( MavenConfiguredJUnit4TestRunner.class 
+                ) All other testcases will use their own settings/provisioning inside @Configure 
+                Methods. -->
             <plugin>
                 <groupId>org.ops4j.pax.exam</groupId>
                 <artifactId>maven-paxexam-plugin</artifactId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <systemPropertyVariables>
-                        <!--
-                        <org.apache.cxf.dosgi.test.debug.port>5005</org.apache.cxf.dosgi.test.debug.port>
-                        <org.apache.cxf.dosgi.test.serviceWaitTimeout>180</org.apache.cxf.dosgi.test.serviceWaitTimeout>
-                        -->
+                        <!-- <org.apache.cxf.dosgi.test.debug.port>5005</org.apache.cxf.dosgi.test.debug.port> 
+                            <org.apache.cxf.dosgi.test.serviceWaitTimeout>180</org.apache.cxf.dosgi.test.serviceWaitTimeout> -->
                         <java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>
                     </systemPropertyVariables>
                 </configuration>
diff --git a/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java b/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java
new file mode 100644 (file)
index 0000000..53f8563
--- /dev/null
@@ -0,0 +1,101 @@
+/** 
+ * 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.cxf.dosgi.systests2.multi;
+
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.inject.Inject;
+
+import junit.framework.Assert;
+
+import org.apache.cxf.dosgi.systests2.common.AbstractTestDiscoveryRoundtrip;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.data.Stat;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+@RunWith(JUnit4TestRunner.class)
+public class TestDiscoveryExport extends AbstractTestDiscoveryRoundtrip {
+
+    @Inject
+    BundleContext bundleContext = null;
+
+    @Inject
+    ConfigurationAdmin configAdmin;
+
+    @Configuration
+    public static Option[] configure() throws Exception {
+        Map<Integer, String> bundles = new TreeMap<Integer, String>();
+        MultiBundleTools.getDistroBundles(bundles, true);
+
+        List<Option> opts = new ArrayList<Option>();
+
+        for (Map.Entry<Integer, String> entry : bundles.entrySet()) {
+            String bundleUri = entry.getValue();
+            if (!bundleUri.contains("pax-logging")) {
+                opts.add(CoreOptions.bundle(bundleUri));
+            }
+        }
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles")
+                .artifactId("org.apache.servicemix.bundles.junit").version("4.9_2"));
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples")
+                .artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject());
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples")
+                .artifactId("cxf-dosgi-ri-samples-greeter-impl").versionAsInProject());
+        opts.add(mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common")
+                .versionAsInProject());
+
+        return CoreOptions.options(opts.toArray(new Option[opts.size()]));
+    }
+
+    @Test
+    public void testDiscoveryExport() throws Exception {
+        final int zkPort = getFreePort();
+        configureZookeeper(configAdmin, zkPort);
+        Thread.sleep(3000);
+        ZooKeeper zk = new ZooKeeper("localhost:" + zkPort, 1000, null);
+        Stat stat = zk.exists(
+                "/osgi/service_registry/org/apache/cxf/dosgi/samples/greeter/GreeterService/localhost#9090##greeter",
+                null);
+        Assert.assertNotNull("Node for GreeterService endpoint not found in zookeeper", stat);
+        zk.close();
+    }
+
+    private int getFreePort() throws IOException {
+        ServerSocket socket = new ServerSocket(0);
+        try {
+            return socket.getLocalPort();
+        } finally {
+            socket.close();
+        }
+    }
+}
diff --git a/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryRountrip.java b/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryRountrip.java
deleted file mode 100644 (file)
index ae7a386..0000000
+++ /dev/null
@@ -1,82 +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.cxf.dosgi.systests2.multi;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.cxf.dosgi.systests2.common.AbstractTestDiscoveryRoundtrip;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.CoreOptions;
-import org.ops4j.pax.exam.Inject;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-
-@RunWith( JUnit4TestRunner.class )
-public class TestDiscoveryRountrip extends AbstractTestDiscoveryRoundtrip {
-    @Inject
-    BundleContext bundleContext = null;
-
-    @Configuration
-    public static Option[] configure() throws Exception {
-        Map<Integer, String> bundles = new TreeMap<Integer, String>();
-        int startLevel = MultiBundleTools.getDistroBundles(bundles, true);
-        
-        List<Option> opts = new ArrayList<Option>();
-        
-        // Run this test under Equinox. 
-        opts.add(CoreOptions.frameworks(CoreOptions.equinox()));
-        
-        // This property sets the start level for felix
-        opts.add(CoreOptions.systemProperty("org.osgi.framework.startlevel.beginning").value("" + startLevel));
-        
-        // This property sets the start level for equinox
-        opts.add(CoreOptions.systemProperty("osgi.startLevel").value("" + startLevel));
-
-        for(Map.Entry<Integer, String> entry : bundles.entrySet()) {
-            opts.add(CoreOptions.bundle(entry.getValue()).startLevel(entry.getKey()));
-        }
-      
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.log4j").artifactId("com.springsource.org.apache.log4j").versionAsInProject());
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi").artifactId("cxf-dosgi-ri-discovery-distributed-zookeeper-server").versionAsInProject());
-
-        // This bundle contains the common system testing code
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common").versionAsInProject());
-
-        opts.add(CoreOptions.provision(getClientBundle()));
-        opts.add(CoreOptions.provision(getServerBundle()));
-        
-        return CoreOptions.options(opts.toArray(new Option[opts.size()]));                
-    }
-    
-    protected BundleContext getBundleContext() {
-        return bundleContext;
-    }
-
-    @Test
-    public void testDiscoveryRoundtrip() throws Exception {
-        // Disabled temporarily
-        // baseTestDiscoveryRoundtrip();
-    }
-}
index 092ca3a..c57097a 100644 (file)
@@ -23,11 +23,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
+import javax.inject.Inject;
+
 import org.apache.cxf.dosgi.systests2.common.AbstractTestExportService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.CoreOptions;
-import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
@@ -45,15 +46,16 @@ public class TestExportService extends AbstractTestExportService {
         
         List<Option> opts = new ArrayList<Option>();
 
-        // Run this test under Felix. 
-        opts.add(CoreOptions.frameworks(CoreOptions.felix()));
-        
         for(Map.Entry<Integer, String> entry : bundles.entrySet()) {
-            opts.add(CoreOptions.bundle(entry.getValue()).startLevel(entry.getKey()));
+            String bundleUri = entry.getValue();
+            if (!bundleUri.contains("pax-logging")) {
+                opts.add(CoreOptions.bundle(bundleUri));
+            }
         }
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject().startLevel(++startLevel));
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-impl").versionAsInProject().startLevel(++startLevel));
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common").versionAsInProject().startLevel(++startLevel));
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles" ).artifactId("org.apache.servicemix.bundles.junit").version("4.9_2"));
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject());
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-impl").versionAsInProject());
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common").versionAsInProject());
         opts.add(CoreOptions.systemProperty("org.osgi.framework.startlevel.beginning").value("" + startLevel));
         
         // For debugging...
index 12a619c..9e62fa3 100644 (file)
@@ -23,13 +23,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
+import javax.inject.Inject;
+
 import org.apache.cxf.dosgi.systests2.common.AbstractTestImportService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.CoreOptions;
-import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.BundleContext;
@@ -42,36 +42,19 @@ public class TestImportService extends AbstractTestImportService {
     @Configuration
     public static Option[] configure() throws Exception {
         Map<Integer, String> bundles = new TreeMap<Integer, String>();
-        int startLevel = MultiBundleTools.getDistroBundles(bundles, false);
+        MultiBundleTools.getDistroBundles(bundles, false);
         
         List<Option> opts = new ArrayList<Option>();
-        
-        // Run this test under Felix. 
-        opts.add(CoreOptions.frameworks(CoreOptions.felix()));
-
         for(Map.Entry<Integer, String> entry : bundles.entrySet()) {
-            opts.add(CoreOptions.bundle(entry.getValue()).startLevel(entry.getKey()));
+            String bundleUri = entry.getValue();
+            if (!bundleUri.contains("pax-logging")) {
+                opts.add(CoreOptions.bundle(bundleUri));
+            }
         }
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject().startLevel(++startLevel));
-
-        // This bundle contains the common system testing code
-        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common").versionAsInProject().startLevel(++startLevel));
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject());
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles" ).artifactId("org.apache.servicemix.bundles.junit").version("4.9_2"));
+        opts.add(CoreOptions.mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common").versionAsInProject());
         opts.add(CoreOptions.provision(getTestClientBundle()));
-        opts.add(CoreOptions.systemProperty("org.osgi.framework.startlevel.beginning").value("" + startLevel));
-
-        String loggingConfigFile = System.getProperty("java.util.logging.config.file");
-        if (loggingConfigFile != null) {
-            // When running from eclipse junit the loggingConfigFile will not be set
-            opts.add(CoreOptions.systemProperty("java.util.logging.config.file").value(loggingConfigFile));
-        }
-
-        // For debugging...
-        final String debugPort = System.getProperty("org.apache.cxf.dosgi.test.debug.port");
-        if(debugPort != null) {
-            opts.add(PaxRunnerOptions.vmOption( "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=" + debugPort ));
-            opts.add(CoreOptions.waitForFrameworkStartup());
-        }
-        // end debugging section.
 
         // service wait timeout (this should also be increased for debugging)...
         opts.add(CoreOptions.systemProperty("org.apache.cxf.dosgi.test.serviceWaitTimeout").value(System.getProperty("org.apache.cxf.dosgi.test.serviceWaitTimeout", "20")));
@@ -85,6 +68,9 @@ public class TestImportService extends AbstractTestImportService {
 
     @Test
     public void testClientConsumer() throws Exception {
+//        for( Bundle b : bundleContext.getBundles() ) {
+//            System.out.println( "*** Bundle " + b.getBundleId() + " : " + b.getSymbolicName() + "/" + b.getState());
+//        }
         baseTestClientConsumer();
     }    
 }
diff --git a/systests2/multi-bundle/src/test/resources/log4j.properties b/systests2/multi-bundle/src/test/resources/log4j.properties
new file mode 100644 (file)
index 0000000..02b12a6
--- /dev/null
@@ -0,0 +1,13 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=INFO, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+
+log4j.logger.org.ops4j.pax.scanner=WARN
+log4j.logger.org.ops4j.pax.runner=WARN
+log4j.logger.org.ops4j.pax.url=WARN
\ No newline at end of file