You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by cs...@apache.org on 2016/09/13 11:59:45 UTC

[1/2] cxf-dosgi git commit: Document and clean up decorator

Repository: cxf-dosgi
Updated Branches:
  refs/heads/master 5494b35c9 -> 5e4e9325b


Document and clean up decorator


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

Branch: refs/heads/master
Commit: 0c8ab7ab787ae8097298f5753be48720e88e53ae
Parents: 5494b35
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Tue Sep 13 13:25:42 2016 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Tue Sep 13 13:25:42 2016 +0200

----------------------------------------------------------------------
 decorator/Readme.md                             |  7 +++++
 .../src/test/resources/test-resources/rs1.xml   | 31 --------------------
 .../src/test/resources/test-resources/rs2.xml   | 28 ------------------
 3 files changed, 7 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/0c8ab7ab/decorator/Readme.md
----------------------------------------------------------------------
diff --git a/decorator/Readme.md b/decorator/Readme.md
new file mode 100644
index 0000000..fd62e4f
--- /dev/null
+++ b/decorator/Readme.md
@@ -0,0 +1,7 @@
+# CXF DOSGi Decorator
+
+Allows to export existing services by adding an xml descriptor to OSGI-INF/remote-service.
+
+The descriptor selects services by matching interfaces and service properties and can add arbitrary service properties to it. So these services can be marked for export and configured.
+
+See [example descriptor](src/test/resources/sd.xml).

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/0c8ab7ab/decorator/src/test/resources/test-resources/rs1.xml
----------------------------------------------------------------------
diff --git a/decorator/src/test/resources/test-resources/rs1.xml b/decorator/src/test/resources/test-resources/rs1.xml
deleted file mode 100644
index f67a833..0000000
--- a/decorator/src/test/resources/test-resources/rs1.xml
+++ /dev/null
@@ -1,31 +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.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
-  <service-description>
-    <provide interface="SomeService" />
-    <property name="osgi.remote.requires.intents">confidentiality</property>
-  </service-description>
-  <service-description>
-    <provide interface="SomeOtherService" />
-    <provide interface="WithSomeSecondInterface" />
-  </service-description>
-</service-descriptions>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/0c8ab7ab/decorator/src/test/resources/test-resources/rs2.xml
----------------------------------------------------------------------
diff --git a/decorator/src/test/resources/test-resources/rs2.xml b/decorator/src/test/resources/test-resources/rs2.xml
deleted file mode 100644
index 098aa21..0000000
--- a/decorator/src/test/resources/test-resources/rs2.xml
+++ /dev/null
@@ -1,28 +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.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
-  <service-description>
-    <provide interface="org.example.Service" />
-    <property name="deployment.intents">confidentiality.message integrity</property>
-    <property name="osgi.remote.interfaces">*</property>
-  </service-description>
-</service-descriptions>


[2/2] cxf-dosgi git commit: Documentation

Posted by cs...@apache.org.
Documentation


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

Branch: refs/heads/master
Commit: 5e4e9325b18868150bfcfe07d06a7cdabd10c617
Parents: 0c8ab7a
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Tue Sep 13 13:59:33 2016 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Tue Sep 13 13:59:33 2016 +0200

----------------------------------------------------------------------
 Readme.md                  |  29 +++----
 distribution/Readme.md     |  32 ++++++++
 samples/Readme.md          |  16 ++++
 samples/pom.xml            |   1 +
 samples/repository/pom.xml | 175 ++++++++++++++++++++++++++++++++++++++++
 samples/soap/soap.bndrun   |  72 +++++++++++++++++
 6 files changed, 307 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/5e4e9325/Readme.md
----------------------------------------------------------------------
diff --git a/Readme.md b/Readme.md
index 3587038..5e024f7 100644
--- a/Readme.md
+++ b/Readme.md
@@ -2,31 +2,24 @@
 
 Provides CXF based Distribution providers for [Aries Remote Service Admin (RSA)](http://aries.apache.org/modules/rsa.html).
 
-## Distribution Providers
+CXF DOSGi allows to easily publish and consume SOAP and REST services without using the CXF blueprint extensions or publishing the services using java code. So this is the recommended way to use CXF in OSGi with declarative services. Check the examples to see how simple it is to use.
 
-*   cxf-dosgi-provider-ws SOAP transport 
-*   cxf-dosgi.provider-rs REST transport
+## Modules
+
+* [common - Common services like intents and HTTPService support](common).
+* [provider-ws - SOAP transport] (provider-ws) 
+* [provider-rs - REST transport] (provider-rs)
+* [decorator - Support for exporting existing services] (decorator)
+
+* [Examples](samples).
+* [Distributions](distribution).
 
 ## Intents
 
 A service can list the named intents it requires. It will then only be exported / imported 
 once all the intents are available. This allows for example security restrictions or logging.
-
-Example
-
-* service.exported.intents=logging
-
-See [common module](common).
+For more informations see [common module](common).
 
 ## Build
 
 mvn clean install
-
-## Deployment
-
-CXF DOSGi can be deployed in three different ways
-
-*   Multi bundle distro (deprecated)
-*   Karaf feature
-*   Bndtools pom repository
- 

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/5e4e9325/distribution/Readme.md
----------------------------------------------------------------------
diff --git a/distribution/Readme.md b/distribution/Readme.md
new file mode 100644
index 0000000..651bf9d
--- /dev/null
+++ b/distribution/Readme.md
@@ -0,0 +1,32 @@
+# CXF DOSGi Distribtions
+
+## Apache karaf features
+
+Installing CXF DOSGi in apache karaf is very easy. 
+
+```
+feature:repo-add cxf-dosgi 2.0.0
+feature:install cxf-dosgi-provider-ws feature:install cxf-dosgi-provider-rs
+```
+
+There are also karaf features for the samples that make it really easy to try them inside karaf.
+
+## Bndtools pom based index
+
+Bndtools allows to specify a deployment using a bndrun file. In this file the user only needs to specify
+some top level bundles. Bnd then resolves these against an OSGi index.
+In CXF-DOSGi we provide all necessary bundles in the [repository](repository) module. This can then be used to create an index for bndtools.
+
+Any example for this is the [samples/repository](../samples/repository) module. This pom refers to the Aries RSA and CXF DOSGi repository poms and adds other bundles needed to create a complete OSGi deployment.
+
+The [SOAP sample](../samples/soap) contains a bndrun file to describe the setup of the SOAP sample. 
+
+## Multi-Bundle
+
+Provides an archive of the dependencies of CXF DOSGi as well as configs for felix and equinox to start the bundles.
+
+This distribution is deprecated as it is quite tedious to create an automated build for your own application based on the archive. 
+
+## Source
+
+Provides the full source code of CXF DOSGi as required by the apache policies. A better way to access the source is through git and [github](https://github.com/apache/cxf-dosgi).

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/5e4e9325/samples/Readme.md
----------------------------------------------------------------------
diff --git a/samples/Readme.md b/samples/Readme.md
new file mode 100644
index 0000000..db0ca69
--- /dev/null
+++ b/samples/Readme.md
@@ -0,0 +1,16 @@
+# CXF DOSGi Examples
+
+All examples are written using DS. For other DI frameworks use their methods to publish and consume
+OSGi services.
+
+The features module provides Apache Karaf features for the examples. So using karaf is the easiest way to get the examples up and running quickly.
+
+The SOAP example also provides a bndrun file for bndtools that allows to directly start/debug the service from Eclipse and export it into a runnable jar.
+
+## Examples
+
+* [soap - Publish and Consume JAXWS SOAP services](soap)
+* [rest - Publish and Consume REST services] (rest) 
+* [security-filter - Custom HTTP filter] (security filter)
+* [ssl - SSL support and client cert based auth] (ssl)
+

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/5e4e9325/samples/pom.xml
----------------------------------------------------------------------
diff --git a/samples/pom.xml b/samples/pom.xml
index 17596cd..aca92f7 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -42,6 +42,7 @@
       <module>rest</module>
       <module>soap</module>
       <module>security_filter</module>
+      <module>repository</module>
       <module>features</module>
     </modules>
 </project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/5e4e9325/samples/repository/pom.xml
----------------------------------------------------------------------
diff --git a/samples/repository/pom.xml b/samples/repository/pom.xml
new file mode 100644
index 0000000..2c7fdb7
--- /dev/null
+++ b/samples/repository/pom.xml
@@ -0,0 +1,175 @@
+<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/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.cxf.dosgi</groupId>
+        <artifactId>cxf-dosgi-parent</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+    <artifactId>cxf-dosgi-samples-repository</artifactId>
+    <name>CXF DOSGi Samples Repository</name>
+
+    <dependencies>
+        <!-- Basic Felix bundles -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>5.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.eventadmin</artifactId>
+            <version>1.4.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.8.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.metatype</artifactId>
+            <version>1.1.2</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>kxml2</artifactId>
+                    <groupId>net.sf.kxml</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.fileinstall</artifactId>
+            <version>3.5.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.command</artifactId>
+            <version>0.17.0-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>org.osgi.core</artifactId>
+                    <groupId>org.osgi</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>org.osgi.compendium</artifactId>
+                    <groupId>org.osgi</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>
+                        org.apache.felix.bundlerepository
+                    </artifactId>
+                    <groupId>org.apache.felix</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.jline</artifactId>
+            <version>0.1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.runtime</artifactId>
+            <version>0.17.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.shell</artifactId>
+            <version>0.13.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr</artifactId>
+            <version>2.0.2</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>animal-sniffer-annotations</artifactId>
+                    <groupId>org.codehaus.mojo</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.http.jetty</artifactId>
+            <version>3.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty.websocket</groupId>
+                    <artifactId>websocket-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.http.base</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+            <version>1.8.5</version>
+        </dependency>
+        <dependency>
+            <groupId>jline</groupId>
+            <artifactId>jline</artifactId>
+            <version>3.0.0.M1</version>
+        </dependency>
+        
+        <!-- rsa -->
+        <dependency>
+            <groupId>org.apache.cxf.dosgi</groupId>
+            <artifactId>cxf-dosgi-repository</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-samples-soap-impl</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-samples-soap-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-samples-rest-impl</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-samples-rest-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-indexer-maven-plugin</artifactId>
+                <version>3.2.0</version>
+                <configuration>
+                    <localURLs>REQUIRED</localURLs>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>index</id>
+                        <goals>
+                            <goal>index</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/5e4e9325/samples/soap/soap.bndrun
----------------------------------------------------------------------
diff --git a/samples/soap/soap.bndrun b/samples/soap/soap.bndrun
new file mode 100644
index 0000000..4227b72
--- /dev/null
+++ b/samples/soap/soap.bndrun
@@ -0,0 +1,72 @@
+-standalone: ../repository/target/index.xml
+-runsystemcapabilities: ${native_capability}
+
+-runblacklist: \
+    osgi.identity;filter:='(osgi.identity=slf4j.api)'
+
+-runfw: org.apache.felix.framework;version='[5.4.0,5.4.0]'
+-runee: JavaSE-1.8
+
+-runproperties: \
+	org.ops4j.pax.logging.DefaultServiceLog.level=INFO,\
+	org.apache.felix.http.jettyEnabled=true,\
+	org.osgi.framework.bootdelegation=com.sun.*,\
+	org.osgi.framework.system.packages.extra='sun.misc,javax.xml.bind.annotation;version=2.2.1,javax.xml.bind;version=2.2.1'
+	
+# felix.cm.loglevel=4,\
+#	felix.fileinstall.dir=./etc,\
+#	felix.fileinstall.noInitialDelay=true,\
+#	felix.fileinstall.enableConfigSave=false,\
+#	felix.fileinstall.log.level=4,\
+#	org.osgi.framework.startlevel.beginning=100,\
+
+# Only needed for karaf console
+#	karaf.systemBundlesStartLevel=0,\
+#	karaf.startLocalConsole=true,\
+#	karaf.local.roles='admin,manager,viewer,systembundles',\
+
+
+-runrequires: \
+	osgi.identity;filter:='(osgi.identity=org.apache.felix.fileinstall)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
+	osgi.identity;filter:='(osgi.identity=org.ops4j.pax.logging.pax-logging-service)',\
+	osgi.identity;filter:='(osgi.identity=org.objectweb.asm.all)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.cxf.dosgi.samples.cxf-dosgi-samples-soap-impl)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.jline)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.felix.http.jetty)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.cxf.dosgi.cxf-dosgi-provider-ws)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.topology-manager)'
+-runbundles: \
+	org.apache.cxf.dosgi.samples.cxf-dosgi-samples-soap-api;version='[2.0.0,2.0.1)',\
+	org.apache.cxf.dosgi.samples.cxf-dosgi-samples-soap-impl;version='[2.0.0,2.0.1)',\
+	org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
+	org.apache.felix.fileinstall;version='[3.5.2,3.5.3)',\
+	org.apache.felix.gogo.command;version='[0.17.0,0.17.1)',\
+	org.apache.felix.gogo.jline;version='[0.1.0,0.1.1)',\
+	org.apache.felix.gogo.runtime;version='[0.17.0,0.17.1)',\
+	org.objectweb.asm.all;version='[5.0.4,5.0.5)',\
+	org.ops4j.pax.logging.pax-logging-api;version='[1.8.5,1.8.6)',\
+	org.ops4j.pax.logging.pax-logging-service;version='[1.8.5,1.8.6)',\
+	org.apache.aries.rsa.core;version='[1.10.0,1.10.1)',\
+	org.apache.aries.rsa.spi;version='[1.10.0,1.10.1)',\
+	javax.servlet-api;version='[3.1.0,3.1.1)',\
+	org.apache.felix.eventadmin;version='[1.4.6,1.4.7)',\
+	org.apache.felix.http.api;version='[2.3.2,2.3.3)',\
+	org.apache.felix.http.jetty;version='[3.0.0,3.0.1)',\
+	jline;version='[3.0.0,3.0.1)',\
+	org.apache.cxf.cxf-core;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-bindings-soap;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-bindings-xml;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-databinding-aegis;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-databinding-jaxb;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-frontend-jaxws;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-frontend-simple;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-transports-http;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.cxf-rt-wsdl;version='[3.1.7,3.1.8)',\
+	org.apache.cxf.dosgi.cxf-dosgi-common;version='[2.0.0,2.0.1)',\
+	org.apache.cxf.dosgi.cxf-dosgi-provider-ws;version='[2.0.0,2.0.1)',\
+	org.apache.felix.scr;version='[2.0.2,2.0.3)',\
+	org.apache.servicemix.bundles.wsdl4j;version='[1.6.3,1.6.4)',\
+	org.apache.ws.xmlschema.core;version='[2.2.1,2.2.2)',\
+	org.apache.aries.rsa.discovery.config;version='[1.10.0,1.10.1)',\
+	org.apache.aries.rsa.topology-manager;version='[1.10.0,1.10.1)'
\ No newline at end of file