cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [2/2] cxf-dosgi git commit: [DOSGI-241] Simplify examples
Date Thu, 30 Jun 2016 13:09:18 GMT
[DOSGI-241] Simplify examples


Project: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/commit/90f706e3
Tree: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/tree/90f706e3
Diff: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/diff/90f706e3

Branch: refs/heads/master
Commit: 90f706e376f31e6ab7ee4381d87360f938d924d4
Parents: 8d58f3e
Author: Christian Schneider <chris@die-schneider.net>
Authored: Thu Jun 30 15:09:08 2016 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Thu Jun 30 15:09:08 2016 +0200

----------------------------------------------------------------------
 distribution/features/pom.xml                   | 159 +++++++-------
 .../features/src/main/resources/features.xml    |   7 +-
 distribution/multi-bundle/pom.xml               |   4 +-
 .../src/main/xsl/filter_features.xslt           |   4 +-
 parent/pom.xml                                  |   7 +-
 samples/ds/client/pom.xml                       |  34 +--
 .../dosgi/samples/ds/consumer/Activator.java    |  45 ----
 .../samples/ds/consumer/AdderConsumer.java      |  16 +-
 .../src/main/resources/OSGI-INF/component.xml   |  20 --
 samples/ds/impl/pom.xml                         |  23 +-
 .../dosgi/samples/ds/impl/AdderServiceImpl.java |   9 +
 .../src/main/resources/OSGI-INF/component.xml   |  26 ---
 samples/ds/interface/pom.xml                    |   2 +-
 samples/ds/pom.xml                              |  58 +++---
 samples/greeter/client/pom.xml                  |  36 +---
 .../dosgi/samples/greeter/client/Activator.java | 106 ----------
 .../samples/greeter/client/GreeterClient.java   |  48 +++++
 .../samples/greeter/client/GreeterDialog.java   | 208 -------------------
 samples/greeter/impl/pom.xml                    |  38 +---
 .../dosgi/samples/greeter/impl/Activator.java   |  47 -----
 .../greeter/impl/GreeterServiceImpl.java        |  14 +-
 samples/greeter/interface/pom.xml               |  41 +---
 samples/greeter/pom.xml                         |  14 +-
 samples/greeter_rest/client/pom.xml             |  75 ++-----
 .../samples/greeter/client/rest/Activator.java  | 126 -----------
 .../greeter/client/rest/GreeterClient.java      |  46 ++++
 .../OSGI-INF/remote-service/remote-services.xml |   7 -
 samples/greeter_rest/impl/pom.xml               |  40 +---
 .../samples/greeter/impl/rest/Activator.java    |  59 ------
 .../greeter/impl/rest/GreeterServiceImpl.java   |  15 +-
 .../greeter/impl/rest/GreeterServiceImpl2.java  |  33 ---
 samples/greeter_rest/impl2/pom.xml              |  78 -------
 .../samples/greeter/impl2/rest/Activator.java   |  53 -----
 .../greeter/impl2/rest/GreeterServiceImpl2.java |  49 -----
 samples/greeter_rest/interface/pom.xml          |   2 +-
 .../samples/greeter/rest/GreeterService2.java   |  24 ---
 samples/greeter_rest/pom.xml                    |  62 +++---
 samples/pom.xml                                 |   1 -
 systests2/multi-bundle/pom.xml                  |   2 +-
 .../systests2/multi/AbstractDosgiTest.java      |  13 +-
 .../multi/GreeterServiceProxyFactory.java       |  38 ++++
 .../dosgi/systests2/multi/MultiBundleTools.java |   4 -
 .../dosgi/systests2/multi/TestCustomIntent.java |   1 +
 .../systests2/multi/TestDiscoveryExport.java    |   2 +-
 .../systests2/multi/TestExportRestService.java  |   2 +-
 .../systests2/multi/TestExportService.java      |   4 +-
 .../systests2/multi/TestImportService.java      |   2 +-
 47 files changed, 380 insertions(+), 1324 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/distribution/features/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/features/pom.xml b/distribution/features/pom.xml
index 104e516..6b8e9db 100644
--- a/distribution/features/pom.xml
+++ b/distribution/features/pom.xml
@@ -1,90 +1,83 @@
 <?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
+<!-- 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. -->
+<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">
 
-  http://www.apache.org/licenses/LICENSE-2.0
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>cxf-dosgi</artifactId>
+    <packaging>pom</packaging>
+    <name>CXF DOSGI Karaf Features</name>
+    <url>http://cxf.apache.org</url>
 
-  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.
--->
-<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">
+    <parent>
+        <groupId>org.apache.cxf.dosgi</groupId>
+        <artifactId>cxf-dosgi-ri-distribution-parent</artifactId>
+        <version>1.9-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
 
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>cxf-dosgi</artifactId>
-  <packaging>pom</packaging>
-  <name>CXF DOSGI Karaf Features</name>
-  <url>http://cxf.apache.org</url>
+    <properties>
+        <dosgi.version>${project.version}</dosgi.version>
+        <topDirectoryLocation>../..</topDirectoryLocation>
+    </properties>
 
-  <parent>
-    <groupId>org.apache.cxf.dosgi</groupId>
-    <artifactId>cxf-dosgi-ri-distribution-parent</artifactId>
-    <version>1.9-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <properties>
-    <dosgi.version>${project.version}</dosgi.version>
-    <topDirectoryLocation>../..</topDirectoryLocation>
-  </properties>
-
-  <build>
-		<resources>
-			<resource>
-				<directory>${project.basedir}/src/main/resources</directory>
-				<filtering>true</filtering>
-				<includes>
-					<include>**/features.xml</include>
-			                <include>**/*.cfg</include>
-			                <include>**/*.properties</include>
-				</includes>
-			</resource>
-		</resources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-resources-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>filter</id>
-						<phase>generate-resources</phase>
-						<goals>
-							<goal>resources</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>attach-artifacts</id>
-						<phase>package</phase>
-						<goals>
-							<goal>attach-artifact</goal>
-						</goals>
-						<configuration>
-							<artifacts>
-								<artifact>
-									<file>target/classes/features.xml</file>
-									<type>xml</type>
+    <build>
+        <resources>
+            <resource>
+                <directory>${project.basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/features.xml</include>
+                    <include>**/*.cfg</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>filter</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>target/classes/features.xml</file>
+                                    <type>xml</type>
                                     <classifier>features</classifier>
-								</artifact>
-							</artifacts>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/distribution/features/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/distribution/features/src/main/resources/features.xml b/distribution/features/src/main/resources/features.xml
index 2a8686f..b5f3b9f 100644
--- a/distribution/features/src/main/resources/features.xml
+++ b/distribution/features/src/main/resources/features.xml
@@ -10,10 +10,7 @@
         <bundle start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/3.5.0</bundle>
         <bundle start-level="20">mvn:org.apache.aries/org.apache.aries.util/1.1.1</bundle>
         <bundle start-level="20">mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/1.0.1</bundle>
-        <bundle start-level="20">mvn:org.apache.aries.proxy/org.apache.aries.proxy.impl/1.0.4</bundle>
-        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1</bundle>
-        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.5.0</bundle>
-        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.7</bundle>
+        <bundle>mvn:org.apache.felix/org.apache.felix.scr/2.0.2</bundle>
     </feature>
 
     <feature name="cxf-dosgi-provider-cxf" version="${project.version}">
@@ -28,5 +25,5 @@
         <bundle>mvn:${project.groupId}/cxf-dosgi-ri-dsw-cxf/${project.version}</bundle>
         <bundle>mvn:${project.groupId}/cxf-dosgi-ri-decorator/${project.version}</bundle>
     </feature>
-    
+
 </features>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/distribution/multi-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/multi-bundle/pom.xml b/distribution/multi-bundle/pom.xml
index 652b2e8..b3e2cd4 100644
--- a/distribution/multi-bundle/pom.xml
+++ b/distribution/multi-bundle/pom.xml
@@ -34,7 +34,7 @@
   <properties>
     <dosgi.version>${project.version}</dosgi.version>
     <topDirectoryLocation>../..</topDirectoryLocation>
-    <karaf.version>3.0.6</karaf.version>
+    <karaf.version>4.0.5</karaf.version>
   </properties>
 
   <build>
@@ -49,7 +49,7 @@
     <plugin>
         <groupId>org.apache.karaf.tooling</groupId>
         <artifactId>karaf-maven-plugin</artifactId>
-        <version>${karaf.version}</version>
+        <version>3.0.6</version>
 
         <executions>
           <execution>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/distribution/multi-bundle/src/main/xsl/filter_features.xslt
----------------------------------------------------------------------
diff --git a/distribution/multi-bundle/src/main/xsl/filter_features.xslt b/distribution/multi-bundle/src/main/xsl/filter_features.xslt
index 0579926..5fdfd2e 100644
--- a/distribution/multi-bundle/src/main/xsl/filter_features.xslt
+++ b/distribution/multi-bundle/src/main/xsl/filter_features.xslt
@@ -6,7 +6,9 @@
 
     <!-- Filter out undesired bundles -->
     <xsl:template match="bundle[@artifactId='cxf-karaf-commands']"></xsl:template>
-    <xsl:template match="bundle[@artifactId='org.apache.karaf.http.command']"></xsl:template>
+    <xsl:template match="bundle[@artifactId='org.apache.karaf.http.core']"></xsl:template>
+    <xsl:template match="bundle[@artifactId='org.apache.aries.spifly.dynamic.bundle']"></xsl:template>
+    <xsl:template match="bundle[@groupId='org.eclipse.jetty.websocket']"></xsl:template>
 
     <!-- Copy the rest unachanged -->
     <xsl:template match="@* | node()">

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 5ae1bab..70933a8 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -56,7 +56,6 @@
         <woodstox.bundle.version>4.4.1</woodstox.bundle.version>
         <jaxbimpl.bundle.version>2.2.1.1_2</jaxbimpl.bundle.version>
         <slf4j.version>1.7.14</slf4j.version>
-        <felix.plugin.version>2.4.0</felix.plugin.version>
         <exam.version>4.8.0</exam.version>
     </properties>
 
@@ -135,9 +134,9 @@
             </dependency>
 
             <dependency>
-                <groupId>org.eclipse</groupId>
+                <groupId>org.eclipse.tycho</groupId>
                 <artifactId>org.eclipse.osgi</artifactId>
-                <version>3.8.0.v20120529-1548</version>
+                <version>3.10.101.v20150820-1432</version>
             </dependency>
 
             <dependency>
@@ -228,7 +227,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>${felix.plugin.version}</version>
+                <version>3.0.1</version>
                 <extensions>true</extensions>
                 <configuration>
                     <obrRepository>NONE</obrRepository>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/client/pom.xml b/samples/ds/client/pom.xml
index 42c7e8a..7c5f1df 100644
--- a/samples/ds/client/pom.xml
+++ b/samples/ds/client/pom.xml
@@ -11,11 +11,9 @@
     language governing permissions and limitations under the License. -->
 <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>
-    <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-ds-client</artifactId>
     <packaging>bundle</packaging>
-    <name>Distributed OSGI Declarative Services Sample Client Bundle</name>
-    <version>1.9-SNAPSHOT</version>
+    <name>Distributed OSGI Declarative Services Sample Client</name>
 
     <parent>
         <groupId>org.apache.cxf.dosgi.samples</groupId>
@@ -27,42 +25,12 @@
         <topDirectoryLocation>..</topDirectoryLocation>
     </properties>
 
-
     <dependencies>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.cxf.dosgi.samples</groupId>
             <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>${project.name}</Bundle-Name>
-                        <Bundle-Description>The client-side
-                            implementation of the Distributed OSGi with
-                            Declarative Services sample</Bundle-Description>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Activator>org.apache.cxf.dosgi.samples.ds.consumer.Activator</Bundle-Activator>
-                        <Import-Package>*</Import-Package>
-                        <Private-Package>org.apache.cxf.dosgi.samples.ds.consumer</Private-Package>
-                        <Service-Component>OSGI-INF/component.xml</Service-Component>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java b/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java
deleted file mode 100644
index ac059ad..0000000
--- a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java
+++ /dev/null
@@ -1,45 +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.samples.ds.consumer;
-
-import org.apache.cxf.dosgi.samples.ds.AdderService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * This Activator simply registers a service tracker to indicate its interest in the
- * AdderService which causes the service to get registered by the Listener Hook.
- * It is a workaround for the problem that the current ListenerHook is incompatible
- * with the Equinox DS implementation which doesn't specify a filter when looking up
- * a service. See also DOSGI-73.
- */
-public class Activator implements BundleActivator {
-
-    private ServiceTracker<AdderService, AdderService> tracker;
-
-    public void start(BundleContext context) throws Exception {
-        tracker = new ServiceTracker<AdderService, AdderService>(context, AdderService.class, null);
-        tracker.open();
-    }
-
-    public void stop(BundleContext context) throws Exception {
-        tracker.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java b/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
index 060ed42..4c96ea2 100644
--- a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
+++ b/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
@@ -19,21 +19,21 @@
 package org.apache.cxf.dosgi.samples.ds.consumer;
 
 import org.apache.cxf.dosgi.samples.ds.AdderService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
 
+@Component
 public class AdderConsumer {
 
     private AdderService adder;
 
-    public void bindAdder(AdderService a) {
-        adder = a;
-    }
-
-    public void unbindAdder(AdderService a) {
-        adder = null;
-    }
-
     public void start() {
         System.out.println("Declarative Service consumer component.");
         System.out.println("Using adder service: 1 + 1 = " + adder.add(1, 1));
     }
+
+    @Reference
+    public void setAdder(AdderService adder) {
+        this.adder = adder;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/client/src/main/resources/OSGI-INF/component.xml
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/resources/OSGI-INF/component.xml b/samples/ds/client/src/main/resources/OSGI-INF/component.xml
deleted file mode 100644
index 31b91f7..0000000
--- a/samples/ds/client/src/main/resources/OSGI-INF/component.xml
+++ /dev/null
@@ -1,20 +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.
-  -->
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="DS Consumer Sample" activate="start">
-   <implementation class="org.apache.cxf.dosgi.samples.ds.consumer.AdderConsumer"/>
-   <reference interface="org.apache.cxf.dosgi.samples.ds.AdderService" name="AdderService" cardinality="1..1" policy="dynamic" bind="bindAdder" unbind="unbindAdder"/>
-</scr:component>
-

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/impl/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/impl/pom.xml b/samples/ds/impl/pom.xml
index 7c8d90d..80c1744 100644
--- a/samples/ds/impl/pom.xml
+++ b/samples/ds/impl/pom.xml
@@ -19,11 +19,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">
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.cxf.dosgi.samples</groupId>
   <artifactId>cxf-dosgi-ri-samples-ds-impl</artifactId>
   <packaging>bundle</packaging>
-  <name>Distributed OSGI Declarative Services Sample Implementation Bundle</name>
-  <version>1.9-SNAPSHOT</version>
 
   <parent>
     <groupId>org.apache.cxf.dosgi.samples</groupId>
@@ -35,7 +32,6 @@
     <topDirectoryLocation>..</topDirectoryLocation>
   </properties>
 
-
   <dependencies>
     <dependency>
       <groupId>org.apache.cxf.dosgi.samples</groupId>
@@ -44,22 +40,5 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <instructions>
-            <Bundle-Name>${project.name}</Bundle-Name>
-            <Bundle-Description>The server-side implementation of the Distributed OSGi with Declarative Services sample</Bundle-Description>
-            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-            <Import-Package>org.apache.cxf.dosgi.samples.ds</Import-Package>
-            <Private-Package>org.apache.cxf.dosgi.samples.ds.impl</Private-Package>
-            <Service-Component>OSGI-INF/component.xml</Service-Component>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+  <name>Distributed OSGI Declarative Services Sample Impl</name>
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
----------------------------------------------------------------------
diff --git a/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java b/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
index 0d1fcba..3d65d3e 100644
--- a/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
+++ b/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
@@ -19,7 +19,16 @@
 package org.apache.cxf.dosgi.samples.ds.impl;
 
 import org.apache.cxf.dosgi.samples.ds.AdderService;
+import org.osgi.service.component.annotations.Component;
 
+@Component(immediate = true, //
+    property = //
+    {
+     "service.exported.interfaces=*", //
+     "service.exported.configs=org.apache.cxf.ws", //
+     "org.apache.cxf.ws.address=http://localhost:9090/adder" //
+    } //
+)
 public class AdderServiceImpl implements AdderService {
 
     public int add(int a, int b) {

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/impl/src/main/resources/OSGI-INF/component.xml
----------------------------------------------------------------------
diff --git a/samples/ds/impl/src/main/resources/OSGI-INF/component.xml b/samples/ds/impl/src/main/resources/OSGI-INF/component.xml
deleted file mode 100644
index 3687b78..0000000
--- a/samples/ds/impl/src/main/resources/OSGI-INF/component.xml
+++ /dev/null
@@ -1,26 +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.
-  -->
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="DS Service Sample">
-  <implementation class="org.apache.cxf.dosgi.samples.ds.impl.AdderServiceImpl"/>
-
-  <property name="service.exported.interfaces" value="*" />
-  <property name="service.exported.configs" value="org.apache.cxf.ws" />
-  <property name="org.apache.cxf.ws.address" value="http://localhost:9090/adder" />
-
-  <service>
-    <provide interface="org.apache.cxf.dosgi.samples.ds.AdderService"/>
-  </service>
-</scr:component>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/interface/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/interface/pom.xml b/samples/ds/interface/pom.xml
index 2356a90..4598db8 100644
--- a/samples/ds/interface/pom.xml
+++ b/samples/ds/interface/pom.xml
@@ -23,7 +23,7 @@
   <groupId>org.apache.cxf.dosgi.samples</groupId>
   <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId>
   <packaging>bundle</packaging>
-  <name>Distributed OSGI Declarative Services Sample Interface Bundle</name>
+  <name>Distributed OSGI Declarative Services Sample Interface</name>
   <version>1.9-SNAPSHOT</version>
 
   <parent>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/ds/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/pom.xml b/samples/ds/pom.xml
index c763018..3987c69 100644
--- a/samples/ds/pom.xml
+++ b/samples/ds/pom.xml
@@ -1,23 +1,16 @@
 <?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.
--->
-<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">
+<!-- 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. -->
+<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>
     <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId>
@@ -26,16 +19,29 @@
     <version>1.9-SNAPSHOT</version>
 
     <parent>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-parent</artifactId>
-      <version>1.9-SNAPSHOT</version>
-      <relativePath>../../parent/pom.xml</relativePath>
+        <groupId>org.apache.cxf.dosgi</groupId>
+        <artifactId>cxf-dosgi-ri-parent</artifactId>
+        <version>1.9-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <modules>
-      <module>interface</module>
-      <module>impl</module>
-      <module>client</module>
+        <module>interface</module>
+        <module>impl</module>
+        <module>client</module>
     </modules>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/client/pom.xml b/samples/greeter/client/pom.xml
index 520868f..b8ece5d 100644
--- a/samples/greeter/client/pom.xml
+++ b/samples/greeter/client/pom.xml
@@ -20,17 +20,15 @@
 <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>
-    <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-greeter-client</artifactId>
     <packaging>bundle</packaging>
     <name>Distributed OSGI Greeter Bundle Client</name>
-    <version>1.9-SNAPSHOT</version>
 
     <parent>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-parent</artifactId>
+      <groupId>org.apache.cxf.dosgi.samples</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId>
       <version>1.9-SNAPSHOT</version>
-      <relativePath>../../../parent/pom.xml</relativePath>
+      <relativePath>../pom.xml</relativePath>
     </parent>
 
     <properties>
@@ -45,34 +43,6 @@
             <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
     </dependencies>
 
-    <build>
-      <plugins>
-        <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>CXF Distributed OSGi Greeter Demo Client Bundle</Bundle-Name>
-                        <Bundle-Description>The client-side implementation of the Distributed OSGi Greeter demo</Bundle-Description>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.client.Activator</Bundle-Activator>
-                        <Import-Package>${bundle.import.package}</Import-Package>
-                        <Private-Package>${bundle.private.package}</Private-Package>
-                        <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-         </plugins>
-    </build>
-
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java
deleted file mode 100644
index 121573e..0000000
--- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java
+++ /dev/null
@@ -1,106 +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.samples.greeter.client;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.cxf.dosgi.samples.greeter.GreeterData;
-import org.apache.cxf.dosgi.samples.greeter.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
-
-    private ServiceTracker<GreeterService, GreeterService> tracker;
-    private ConcurrentHashMap<GreeterService, GreeterDialog> dialogs =
-                new ConcurrentHashMap<GreeterService, GreeterDialog>();
-
-    public void start(final BundleContext bc) {
-        tracker = new ServiceTracker<GreeterService, GreeterService>(bc, GreeterService.class, null) {
-            @Override
-            public GreeterService addingService(ServiceReference<GreeterService> reference) {
-                GreeterService service = super.addingService(reference);
-                dialogs.put(service, new GreeterDialog());
-                useService(service);
-                return service;
-            }
-
-            @Override
-            public void removedService(ServiceReference<GreeterService> reference, GreeterService service) {
-                super.removedService(reference, service);
-                GreeterDialog dialog = dialogs.remove(service);
-                dialog.dispose();
-            }
-        };
-        tracker.open();
-    }
-
-    protected void useService(final GreeterService greeter) {
-        Thread t = new Thread(new Runnable() {
-            public void run() {
-                greeterUI(greeter);
-            }
-        });
-        t.start();
-    }
-
-    private void greeterUI(final GreeterService greeter) {
-        while (true) {
-            GreeterDialog dialog = dialogs.get(greeter);
-            if (dialog == null) {
-                return; // exit thread if service is removed
-            }
-            System.out.println("*** Opening greeter client dialog ***");
-            dialog.resetSelection();
-            dialog.setVisible(true); // blocks until dismissed
-            Object gd = dialog.getSelection();
-
-            if (gd instanceof String) {
-                System.out.println("*** Invoking greeter ***");
-                Map<GreetingPhrase, String> result = greeter.greetMe((String) gd);
-
-                System.out.println("greetMe(\"" + gd + "\") returns:");
-                for (Map.Entry<GreetingPhrase, String> greeting : result.entrySet()) {
-                    System.out.println("  " + greeting.getKey().getPhrase()
-                            + " " + greeting.getValue());
-                }
-            } else if (gd instanceof GreeterData) {
-                System.out.println("*** Invoking greeter ***");
-                try {
-                    GreetingPhrase[] result = greeter.greetMe((GreeterData) gd);
-                    System.out.println("greetMe(\"" + gd + "\") returns:");
-                    for (GreetingPhrase phrase : result) {
-                        System.out.println("  " + phrase.getPhrase());
-                    }
-                } catch (GreeterException ex) {
-                    System.out.println("GreeterException: " + ex.toString());
-                }
-            }
-        }
-    }
-
-    public void stop(BundleContext bc) throws Exception {
-        tracker.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java
new file mode 100644
index 0000000..0d7e267
--- /dev/null
+++ b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.dosgi.samples.greeter.client;
+
+import java.util.Map;
+
+import org.apache.cxf.dosgi.samples.greeter.GreeterException;
+import org.apache.cxf.dosgi.samples.greeter.GreeterService;
+import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+@Component
+public class GreeterClient {
+    private GreeterService greeterService;
+
+    @Activate
+    public void activate() throws GreeterException {
+        Map<GreetingPhrase, String> greetings = greeterService.greetMe("Christian");
+        for (GreetingPhrase phrase : greetings.keySet()) {
+            System.out.println(phrase.getPhrase());
+        }
+
+    }
+
+    @Reference
+    public void setGreeterService(GreeterService greeterService) {
+        this.greeterService = greeterService;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java
deleted file mode 100644
index fa48792..0000000
--- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java
+++ /dev/null
@@ -1,208 +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.samples.greeter.client;
-
-import java.awt.Component;
-import java.awt.FlowLayout;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JTextField;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-public class GreeterDialog extends JDialog {
-
-    private static final long serialVersionUID = 1L;
-
-    JTextField name1field;
-    JTextField name2field;
-    JTextField ageTextField;
-    JCheckBox throwExCB;
-    Object selection;
-
-    public GreeterDialog() {
-        super((Frame) null, "Invoke Remote Greeter Service", true);
-
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-        setContentPane(panel);
-
-        final JRadioButton rb1 = new JRadioButton("invoke: Map<GreetingPhrase, String> greetMe(String name);");
-        rb1.setSelected(true);
-        rb1.setAlignmentX(Component.LEFT_ALIGNMENT);
-        panel.add(rb1);
-
-        final JPanel simplePanel = createFirstOptionPanel();
-        rb1.addChangeListener(new ChangeListener() {
-            public void stateChanged(ChangeEvent e) {
-                enablePanel(simplePanel, rb1.isSelected());
-            }
-        });
-        panel.add(simplePanel);
-        panel.add(new JLabel(" ")); // add a spacer
-
-        final JRadioButton rb2
-            = new JRadioButton("invoke: GreetingPhrase[] greetMe(GreeterData data) throws GreeterException;");
-        rb2.setAlignmentX(Component.LEFT_ALIGNMENT);
-        panel.add(rb2);
-
-        final JPanel complexPanel = createSecondOptionPanel();
-
-        rb2.addChangeListener(new ChangeListener() {
-            public void stateChanged(ChangeEvent e) {
-                enablePanel(complexPanel, rb2.isSelected());
-            }
-        });
-
-        panel.add(complexPanel);
-        enablePanel(complexPanel, false);
-
-        JPanel buttons = new JPanel(new FlowLayout(FlowLayout.CENTER));
-        buttons.setAlignmentX(Component.LEFT_ALIGNMENT);
-
-        JButton b1 = new JButton("Invoke");
-        buttons.add(b1);
-
-        b1.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                if (rb1.isSelected()) {
-                    selection = name1field.getText();
-                } else {
-                    selection = new GreeterDataImpl(name2field.getText(),
-                                                    new Integer(ageTextField.getText()),
-                                                    throwExCB.isSelected());
-                }
-
-                setVisible(false);
-            }
-        });
-
-        panel.add(buttons);
-
-        ButtonGroup bg = new ButtonGroup();
-        bg.add(rb1);
-        bg.add(rb2);
-
-        pack();
-        setLocationRelativeTo(null); // centers frame on screen
-    }
-
-    private JPanel createFirstOptionPanel() {
-        final JPanel simplePanel = new JPanel(new GridBagLayout());
-        simplePanel.setAlignmentX(Component.LEFT_ALIGNMENT);
-        GridBagConstraints c1 = new GridBagConstraints();
-
-        JLabel lb1 = new JLabel("Name: ");
-        c1.weightx = 0.0;
-        c1.gridx = 0;
-        c1.gridy = 0;
-        c1.insets = new Insets(0, 25, 0, 0);
-        c1.anchor = GridBagConstraints.LINE_START;
-        simplePanel.add(lb1, c1);
-
-        name1field = new JTextField(20);
-        c1.weightx = 0.2;
-        c1.gridx = 1;
-        c1.gridy = 0;
-        c1.insets = new Insets(0, 10, 0, 0);
-        c1.anchor = GridBagConstraints.LINE_START;
-        simplePanel.add(name1field, c1);
-        return simplePanel;
-    }
-    private JPanel createSecondOptionPanel() {
-        final JPanel complexPanel = new JPanel(new GridBagLayout());
-        complexPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
-        GridBagConstraints c2 = new GridBagConstraints();
-
-        JLabel lb2 = new JLabel("Name: ");
-        c2.weightx = 0.0;
-        c2.gridx = 0;
-        c2.gridy = 0;
-        c2.insets = new Insets(0, 25, 0, 0);
-        c2.anchor = GridBagConstraints.LINE_START;
-        complexPanel.add(lb2, c2);
-
-        name2field = new JTextField(20);
-        c2.weightx = 0.2;
-        c2.gridx = 1;
-        c2.gridy = 0;
-        c2.insets = new Insets(0, 10, 0, 0);
-        c2.anchor = GridBagConstraints.LINE_START;
-        complexPanel.add(name2field, c2);
-
-        JLabel lb3 = new JLabel("Age: ");
-        c2.weightx = 0.0;
-        c2.gridx = 0;
-        c2.gridy = 1;
-        c2.insets = new Insets(0, 25, 0, 0);
-        c2.anchor = GridBagConstraints.LINE_START;
-        complexPanel.add(lb3, c2);
-
-        ageTextField = new JTextField(7);
-        c2.weightx = 0.2;
-        c2.gridx = 1;
-        c2.gridy = 1;
-        c2.insets = new Insets(0, 10, 0, 0);
-        c2.anchor = GridBagConstraints.LINE_START;
-        complexPanel.add(ageTextField, c2);
-
-        throwExCB = new JCheckBox("Throw Exception");
-        c2.weightx = 0.0;
-        c2.gridx = 0;
-        c2.gridy = 2;
-        c2.gridwidth = 2;
-        c2.insets = new Insets(0, 22, 0, 0);
-        c2.anchor = GridBagConstraints.LINE_START;
-        complexPanel.add(throwExCB, c2);
-        return complexPanel;
-    }
-
-    public void resetSelection() {
-        selection = null;
-    }
-
-    public Object getSelection() {
-        return selection;
-    }
-
-    private static void enablePanel(JPanel panel, boolean b) {
-        for (Component c : panel.getComponents()) {
-            c.setEnabled(b);
-        }
-    }
-
-    public static void main(String ... args) {
-        GreeterDialog gd = new GreeterDialog();
-        gd.setVisible(true);
-        System.exit(0);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/impl/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/impl/pom.xml b/samples/greeter/impl/pom.xml
index f8e5462..dbefbd5 100644
--- a/samples/greeter/impl/pom.xml
+++ b/samples/greeter/impl/pom.xml
@@ -19,59 +19,27 @@
 -->
 <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>
-    <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId>
     <packaging>bundle</packaging>
     <name>Distributed OSGI Greeter Implementation Bundle</name>
-    <version>1.9-SNAPSHOT</version>
 
     <parent>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-parent</artifactId>
+      <groupId>org.apache.cxf.dosgi.samples</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId>
       <version>1.9-SNAPSHOT</version>
-      <relativePath>../../../parent/pom.xml</relativePath>
+      <relativePath>../pom.xml</relativePath>
     </parent>
 
     <properties>
-        <bundle.import.package>*</bundle.import.package>
-        <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.impl</bundle.private.package>
         <topDirectoryLocation>..</topDirectoryLocation>
     </properties>
 
     <dependencies>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.cxf.dosgi.samples</groupId>
             <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
 
-    <build>
-      <plugins>
-        <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>CXF Distributed OSGi Greeter Demo Service Implementation Bundle</Bundle-Name>
-                        <Bundle-Description>The server-side implementation of the CXF Distributed OSGi Greeter demo</Bundle-Description>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.impl.Activator</Bundle-Activator>
-                        <Import-Package>${bundle.import.package}</Import-Package>
-                        <Private-Package>${bundle.private.package}</Private-Package>
-                        <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-         </plugins>
-    </build>
-
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java
----------------------------------------------------------------------
diff --git a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java b/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java
deleted file mode 100644
index 9bbbf66..0000000
--- a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java
+++ /dev/null
@@ -1,47 +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.samples.greeter.impl;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-public class Activator implements BundleActivator {
-
-    private ServiceRegistration registration;
-
-    public void start(BundleContext bc) throws Exception {
-        Dictionary<String, String> props = new Hashtable<String, String>();
-
-        props.put("service.exported.interfaces", "*");
-        props.put("service.exported.configs", "org.apache.cxf.ws");
-        props.put("org.apache.cxf.ws.address", "http://localhost:9090/greeter");
-
-        registration = bc.registerService(GreeterService.class.getName(),
-                                          new GreeterServiceImpl(), props);
-    }
-
-    public void stop(BundleContext bc) throws Exception {
-        registration.unregister();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
----------------------------------------------------------------------
diff --git a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java b/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
index 0a10dd8..dde220e 100644
--- a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
+++ b/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
@@ -25,7 +25,17 @@ import org.apache.cxf.dosgi.samples.greeter.GreeterData;
 import org.apache.cxf.dosgi.samples.greeter.GreeterException;
 import org.apache.cxf.dosgi.samples.greeter.GreeterService;
 import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
+import org.osgi.service.component.annotations.Component;
 
+@Component(//
+    immediate = true, //
+    property = //
+    {
+     "service.exported.interfaces=*", //
+     "service.exported.configs=org.apache.cxf.ws", //
+     "org.apache.cxf.ws.address=http://localhost:9090/greeter" //
+    } //
+)
 public class GreeterServiceImpl implements GreeterService {
 
     public Map<GreetingPhrase, String> greetMe(String name) {
@@ -51,8 +61,8 @@ public class GreeterServiceImpl implements GreeterService {
         System.out.println("Invoking: greetMe(" + details + ")");
 
         return new GreetingPhrase[] {
-            new GreetingPhrase("Howdy " + details),
-            new GreetingPhrase("Hallo " + details),
+            new GreetingPhrase("Howdy " + details), //
+            new GreetingPhrase("Hallo " + details), //
             new GreetingPhrase("Ni hao " + details)
         };
     }

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/interface/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/interface/pom.xml b/samples/greeter/interface/pom.xml
index 06627c2..2161c3a 100644
--- a/samples/greeter/interface/pom.xml
+++ b/samples/greeter/interface/pom.xml
@@ -20,54 +20,19 @@
 <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>
-    <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
     <packaging>bundle</packaging>
     <name>Distributed OSGI Greeter Interface Bundle</name>
-    <version>1.9-SNAPSHOT</version>
 
     <parent>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-parent</artifactId>
+      <groupId>org.apache.cxf.dosgi.samples</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId>
       <version>1.9-SNAPSHOT</version>
-      <relativePath>../../../parent/pom.xml</relativePath>
+      <relativePath>../pom.xml</relativePath>
     </parent>
 
     <properties>
-        <bundle.import.package>*</bundle.import.package>
-        <bundle.export.package>org.apache.cxf.dosgi.samples.greeter</bundle.export.package>
         <topDirectoryLocation>..</topDirectoryLocation>
     </properties>
 
-    <dependencies>
-        <dependency>
-           <groupId>junit</groupId>
-           <artifactId>junit</artifactId>
-           <scope>test</scope>
-        </dependency>
-        <dependency>
-           <groupId>org.easymock</groupId>
-           <artifactId>easymockclassextension</artifactId>
-           <scope>test</scope>
-         </dependency>
-    </dependencies>
-
-    <build>
-      <plugins>
-        <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>CXF Distributed OSGi Greeter Demo Interface Bundle</Bundle-Name>
-                        <Bundle-Description>The interfaces of the CXF Distributed OSGi Greeter demo</Bundle-Description>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Import-Package>${bundle.import.package}</Import-Package>
-                        <Export-Package>${bundle.export.package}</Export-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-         </plugins>
-    </build>
-
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/pom.xml b/samples/greeter/pom.xml
index 6c72cd6..07d14c1 100644
--- a/samples/greeter/pom.xml
+++ b/samples/greeter/pom.xml
@@ -24,7 +24,6 @@
     <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId>
     <packaging>pom</packaging>
     <name>Distributed OSGI Greeter Bundles</name>
-    <version>1.9-SNAPSHOT</version>
 
     <parent>
       <groupId>org.apache.cxf.dosgi</groupId>
@@ -32,6 +31,19 @@
       <version>1.9-SNAPSHOT</version>
       <relativePath>../../parent/pom.xml</relativePath>
     </parent>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
 
     <modules>
       <module>interface</module>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/client/pom.xml b/samples/greeter_rest/client/pom.xml
index 1f2c1c1..03425ed 100644
--- a/samples/greeter_rest/client/pom.xml
+++ b/samples/greeter_rest/client/pom.xml
@@ -1,41 +1,30 @@
 <?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.
--->
-<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">
+<!-- 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. -->
+<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>
-    <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-greeter-rest-client</artifactId>
     <packaging>bundle</packaging>
-    <name>Distributed OSGI Greeter Bundle Client</name>
-    <version>1.9-SNAPSHOT</version>
+    <name>Distributed OSGI Greeter REST Client</name>
 
     <parent>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-parent</artifactId>
-      <version>1.9-SNAPSHOT</version>
-      <relativePath>../../../parent/pom.xml</relativePath>
+        <groupId>org.apache.cxf.dosgi.samples</groupId>
+        <artifactId>cxf-dosgi-ri-samples-greeter-rest-parent</artifactId>
+        <version>1.9-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
     <properties>
-        <bundle.import.package>javax.ws.rs.*,*</bundle.import.package>
-        <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.client.rest</bundle.private.package>
-        <topDirectoryLocation>..</topDirectoryLocation>
+        <topDirectoryLocation>../..</topDirectoryLocation>
     </properties>
 
     <dependencies>
@@ -44,34 +33,6 @@
             <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
     </dependencies>
 
-    <build>
-      <plugins>
-        <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>CXF Distributed OSGi Greeter REST Demo Client Bundle</Bundle-Name>
-                        <Bundle-Description>The client-side implementation of the Distributed OSGi Greeter REST demo</Bundle-Description>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.client.rest.Activator</Bundle-Activator>
-                        <Import-Package>${bundle.import.package}</Import-Package>
-                        <Private-Package>${bundle.private.package}</Private-Package>
-                        <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-         </plugins>
-    </build>
-
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/Activator.java
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/Activator.java b/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/Activator.java
deleted file mode 100644
index 0fc7802..0000000
--- a/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/Activator.java
+++ /dev/null
@@ -1,126 +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.samples.greeter.client.rest;
-
-import javax.swing.JOptionPane;
-
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
-
-    private ServiceTracker<GreeterService, GreeterService> tracker;
-    private ServiceTracker<GreeterService2, GreeterService2> tracker2;
-
-    public void start(final BundleContext bc) {
-        tracker = new ServiceTracker<GreeterService, GreeterService>(bc, GreeterService.class, null) {
-            @Override
-            public GreeterService addingService(ServiceReference<GreeterService> reference) {
-                GreeterService service = super.addingService(reference);
-                useGreeterService(service);
-                return service;
-            }
-        };
-        tracker.open();
-
-        tracker2 = new ServiceTracker<GreeterService2, GreeterService2>(bc, GreeterService2.class, null) {
-            @Override
-            public GreeterService2 addingService(ServiceReference<GreeterService2> reference) {
-                GreeterService2 service = super.addingService(reference);
-                useGreeterService2(service);
-                return service;
-            }
-        };
-        tracker2.open();
-    }
-
-    protected void useGreeterService(final GreeterService greeter) {
-        Thread t = new Thread(new Runnable() {
-            public void run() {
-                greeterUI(greeter);
-            }
-        });
-        t.start();
-    }
-
-    protected void useGreeterService2(final GreeterService2 greeter) {
-        Thread t = new Thread(new Runnable() {
-            public void run() {
-                greeter2UI(greeter);
-            }
-        });
-        t.start();
-    }
-
-    private void greeterUI(final GreeterService greeter) {
-        while (true) {
-            System.out.println("*** Opening greeter client dialog ***");
-            String name = JOptionPane.showInputDialog("Enter name:");
-            if (name == null) {
-                break;
-            }
-            System.out.println("*** Invoking greeter ***");
-            try {
-                GreeterInfo info = greeter.greetMe(name);
-
-                System.out.println("greetMe(\"" + name + "\") returns:");
-                for (GreetingPhrase greeting: info.getGreetings()) {
-                    System.out.println("  " + greeting.getPhrase()
-                            + " " + greeting.getName());
-                }
-            } catch (GreeterException ex) {
-                System.out.println("GreeterException: " + ex.toString());
-            }
-        }
-    }
-
-    private void greeter2UI(final GreeterService2 greeter) {
-        while (true) {
-            System.out.println("*** Opening greeter2 client dialog ***");
-            String name = JOptionPane.showInputDialog("Greeter2: Enter name");
-            if (name == null) {
-                break;
-            }
-            System.out.println("*** Invoking greeter2 ***");
-            try {
-                GreeterInfo info = greeter.greetMe(name);
-
-                System.out.println("greetMe(\"" + name + "\") returns:");
-                for (GreetingPhrase greeting: info.getGreetings()) {
-                    System.out.println("  " + greeting.getPhrase()
-                            + " " + greeting.getName());
-                }
-            } catch (GreeterException ex) {
-                System.out.println("GreeterException: " + ex.toString());
-            }
-        }
-    }
-
-    public void stop(BundleContext bc) throws Exception {
-        tracker.close();
-        tracker2.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java b/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java
new file mode 100644
index 0000000..ab25100
--- /dev/null
+++ b/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java
@@ -0,0 +1,46 @@
+/**
+ * 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.samples.greeter.client.rest;
+
+import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException;
+import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo;
+import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService;
+import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+@Component
+public class GreeterClient {
+    private GreeterService greeterService;
+
+    @Activate
+    public void activate() throws GreeterException {
+        GreeterInfo greetings = greeterService.greetMe("Christian");
+        for (GreetingPhrase phrase : greetings.getGreetings()) {
+            System.out.println(phrase.getPhrase());
+        }
+
+    }
+
+    @Reference
+    public void setGreeterService(GreeterService greeterService) {
+        this.greeterService = greeterService;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml b/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
index 1b2ec65..db5bb14 100644
--- a/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
+++ b/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
@@ -21,11 +21,4 @@
     <property name="service.exported.intents">HTTP</property>
     <property name="org.apache.cxf.rs.address">http://localhost:8080/greeter</property>
   </service-description>
-  <service-description>
-    <provide interface="org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2" />
-    <property name="service.exported.interfaces">*</property>
-    <property name="service.exported.configs">org.apache.cxf.rs</property>
-    <property name="service.exported.intents">HTTP</property>
-    <property name="org.apache.cxf.rs.address">http://localhost:8080/greeter2</property>
-  </service-description>
 </service-descriptions>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/impl/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/impl/pom.xml b/samples/greeter_rest/impl/pom.xml
index d6c6c0b..9ed99fd 100644
--- a/samples/greeter_rest/impl/pom.xml
+++ b/samples/greeter_rest/impl/pom.xml
@@ -20,59 +20,27 @@
 <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>
-    <groupId>org.apache.cxf.dosgi.samples</groupId>
     <artifactId>cxf-dosgi-ri-samples-greeter-rest-impl</artifactId>
     <packaging>bundle</packaging>
-    <name>Distributed OSGI Greeter Implementation Bundle</name>
-    <version>1.9-SNAPSHOT</version>
+    <name>Distributed OSGI Greeter REST Impl</name>
 
     <parent>
-      <groupId>org.apache.cxf.dosgi</groupId>
-      <artifactId>cxf-dosgi-ri-parent</artifactId>
+      <groupId>org.apache.cxf.dosgi.samples</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-rest-parent</artifactId>
       <version>1.9-SNAPSHOT</version>
-      <relativePath>../../../parent/pom.xml</relativePath>
+      <relativePath>../pom.xml</relativePath>
     </parent>
 
     <properties>
-        <bundle.import.package>javax.ws.rs.*,*</bundle.import.package>
-        <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.impl.rest</bundle.private.package>
         <topDirectoryLocation>..</topDirectoryLocation>
     </properties>
 
     <dependencies>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.cxf.dosgi.samples</groupId>
             <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
 
-    <build>
-      <plugins>
-        <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>CXF Distributed OSGi Greeter Demo Service REST Implementation Bundle</Bundle-Name>
-                        <Bundle-Description>The server-side implementation of the CXF Distributed OSGi Greeter REST demo</Bundle-Description>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.impl.rest.Activator</Bundle-Activator>
-                        <Import-Package>${bundle.import.package}</Import-Package>
-                        <Private-Package>${bundle.private.package}</Private-Package>
-                        <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-         </plugins>
-    </build>
-
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/Activator.java
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/Activator.java b/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/Activator.java
deleted file mode 100644
index 5ee239b..0000000
--- a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/Activator.java
+++ /dev/null
@@ -1,59 +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.samples.greeter.impl.rest;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-public class Activator implements BundleActivator {
-
-    private ServiceRegistration registration;
-    private ServiceRegistration registration2;
-
-    public void start(BundleContext bc) throws Exception {
-        Dictionary<String, Object> props = getProperties("/greeter");
-        registration = bc.registerService(GreeterService.class.getName(),
-                                          new GreeterServiceImpl(), props);
-
-        props = getProperties("/greeter2");
-        registration2 = bc.registerService(GreeterService2.class.getName(),
-                                          new GreeterServiceImpl2(), props);
-    }
-
-    private Dictionary<String, Object> getProperties(String address) {
-        Dictionary<String, Object> props = new Hashtable<String, Object>();
-
-        props.put("service.exported.interfaces", "*");
-        props.put("service.exported.configs", "org.apache.cxf.rs");
-        props.put("service.exported.intents", "HTTP");
-        props.put("org.apache.cxf.rs.httpservice.context", address);
-        return props;
-    }
-
-    public void stop(BundleContext bc) throws Exception {
-        registration.unregister();
-        registration2.unregister();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java b/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java
index cf8df84..d07084e 100644
--- a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java
+++ b/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java
@@ -25,15 +25,24 @@ import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException;
 import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo;
 import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService;
 import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase;
+import org.osgi.service.component.annotations.Component;
 
+@Component(//
+    immediate = true, //
+    property = //
+    {
+     "service.exported.interfaces=*", //
+     "service.exported.configs=org.apache.cxf.rs", //
+     "service.exported.intents=HTTP", //
+     "org.apache.cxf.rs.httpservice.context=/greeter" //
+    } //
+)
 public class GreeterServiceImpl implements GreeterService {
 
-    private static final String STRANGER_NAME = "Stranger";
-
     public GreeterInfo greetMe(String name) throws GreeterException {
         System.out.println("Invoking: greetMe(" + name + ")");
 
-        if (name.equals(STRANGER_NAME)) {
+        if (name.equals("Stranger")) {
             throw new GreeterException(name);
         }
 

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/90f706e3/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl2.java
----------------------------------------------------------------------
diff --git a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl2.java b/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl2.java
deleted file mode 100644
index 83731c5..0000000
--- a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl2.java
+++ /dev/null
@@ -1,33 +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.samples.greeter.impl.rest;
-
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2;
-
-public class GreeterServiceImpl2 implements GreeterService2 {
-
-    private GreeterServiceImpl greeter = new GreeterServiceImpl();
-
-    public GreeterInfo greetMe(String name) throws GreeterException {
-        System.out.println("Delegating from GreeterServiceImpl2 to GreeterServiceImpl");
-        return greeter.greetMe(name);
-    }
-}


Mime
View raw message