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 2017/09/18 09:47:53 UTC

[cxf-dosgi] branch master updated: [DOSGI-275] Include felix and samples in multibundle distro

This is an automated email from the ASF dual-hosted git repository.

cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf-dosgi.git


The following commit(s) were added to refs/heads/master by this push:
     new b558f79  [DOSGI-275] Include felix and samples in multibundle distro
b558f79 is described below

commit b558f79e346b9732778f150b5519d354b15709a6
Author: Christian Schneider <ch...@die-schneider.net>
AuthorDate: Mon Sep 18 11:47:47 2017 +0200

    [DOSGI-275] Include felix and samples in multibundle distro
---
 distribution/multi-bundle/distro.bndrun            |  45 ++++-----
 distribution/multi-bundle/pom.xml                  |  54 +++++++++--
 .../multi-bundle/src/main/assembly/assembly.xml    |  35 ++++---
 distribution/multi-bundle/src/main/release/README  |  14 ++-
 .../src/main/release/conf/config.properties        | 102 +++++++++++++++++++++
 .../src/main/release/etc/org.ops4j.pax.logging.cfg |   7 ++
 .../cxf/dosgi/itests/multi/MultiBundleTools.java   |   2 +-
 7 files changed, 211 insertions(+), 48 deletions(-)

diff --git a/distribution/multi-bundle/distro.bndrun b/distribution/multi-bundle/distro.bndrun
index dd7ba9a..df08e7b 100644
--- a/distribution/multi-bundle/distro.bndrun
+++ b/distribution/multi-bundle/distro.bndrun
@@ -12,7 +12,6 @@
 -runproperties: \
 	org.ops4j.pax.logging.DefaultServiceLog.level=INFO,\
 	rsa.export.policy.filter="(name=rest)",\
-	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'
 	
@@ -37,11 +36,11 @@
 	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)',\
-	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
 	osgi.identity;filter:='(&(osgi.identity=org.apache.aries.rsa.discovery.command)(version>=1.9.0))',\
 	osgi.identity;filter:='(osgi.identity=org.apache.cxf.dosgi.cxf-dosgi-provider-rs)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-rs-service-description-swagger)',\
-	osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.discovery.zookeeper)'
+	osgi.identity;filter:='(osgi.identity=org.apache.aries.rsa.discovery.zookeeper)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.jline)'
 -runbundles: \
 	org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
 	org.apache.felix.fileinstall;version='[3.5.2,3.5.3)',\
@@ -53,27 +52,11 @@
 	org.apache.felix.http.api;version='[2.3.2,2.3.3)',\
 	org.apache.felix.http.jetty;version='[3.0.0,3.0.1)',\
 	org.apache.servicemix.bundles.wsdl4j;version='[1.6.3,1.6.4)',\
-	org.apache.felix.gogo.command;version='[0.16.0,0.16.1)',\
-	org.apache.felix.gogo.shell;version='[0.12.0,0.12.1)',\
-	org.apache.felix.gogo.runtime;version='[0.10.0,0.10.1)',\
 	org.fusesource.jansi;version='[1.13.0,1.13.1)',\
-	javax.annotation-api;version='[1.2.0,1.2.1)',\
-	org.apache.servicemix.specs.jsr339-api-2.0.1;version='[2.6.0,2.6.1)',\
 	org.apache.aries.rsa.core;version='[1.11.0,1.11.1)',\
 	org.apache.aries.rsa.discovery.command;version='[1.11.0,1.11.1)',\
 	org.apache.aries.rsa.spi;version='[1.11.0,1.11.1)',\
 	org.apache.aries.rsa.topology-manager;version='[1.11.0,1.11.1)',\
-	org.apache.cxf.cxf-core;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-bindings-soap;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-bindings-xml;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-databinding-aegis;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-databinding-jaxb;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-frontend-jaxrs;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-frontend-jaxws;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-frontend-simple;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-rs-client;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-transports-http;version='[3.1.12,3.1.13)',\
-	org.apache.cxf.cxf-rt-wsdl;version='[3.1.12,3.1.13)',\
 	org.apache.cxf.dosgi.cxf-dosgi-common;version='[2.3.0,2.3.1)',\
 	org.apache.cxf.dosgi.cxf-dosgi-provider-rs;version='[2.3.0,2.3.1)',\
 	org.apache.cxf.dosgi.cxf-dosgi-provider-ws;version='[2.3.0,2.3.1)',\
@@ -89,10 +72,28 @@
 	io.swagger.jaxrs;version='[1.5.16,1.5.17)',\
 	io.swagger.models;version='[1.5.16,1.5.17)',\
 	javax.validation.api;version='[1.1.0,1.1.1)',\
-	org.apache.commons.lang3;version='[3.2.1,3.2.2)',\
-	org.apache.cxf.cxf-rt-rs-service-description-swagger;version='[3.1.12,3.1.13)',\
 	org.apache.servicemix.bundles.reflections;version='[0.9.10,0.9.11)',\
 	org.yaml.snakeyaml;version='[1.17.0,1.17.1)',\
 	org.apache.aries.rsa.discovery.local;version='[1.11.0,1.11.1)',\
 	org.apache.aries.rsa.discovery.zookeeper;version='[1.11.0,1.11.1)',\
-	org.apache.hadoop.zookeeper;version='[3.4.10,3.4.11)'
+	org.apache.hadoop.zookeeper;version='[3.4.10,3.4.11)',\
+	javax.annotation-api;version='[1.3.0,1.3.1)',\
+	org.apache.commons.lang3;version='[3.6.0,3.6.1)',\
+	org.apache.cxf.cxf-core;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-bindings-soap;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-bindings-xml;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-databinding-aegis;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-databinding-jaxb;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-frontend-jaxrs;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-frontend-jaxws;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-frontend-simple;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-rs-client;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-rs-service-description-swagger;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-transports-http;version='[3.2.0,3.2.1)',\
+	org.apache.cxf.cxf-rt-wsdl;version='[3.2.0,3.2.1)',\
+	org.apache.felix.bundlerepository;version='[1.6.0,1.6.1)',\
+	org.apache.felix.gogo.command;version='[1.0.0,1.0.1)',\
+	org.apache.felix.gogo.jline;version='[1.0.6,1.0.7)',\
+	org.apache.felix.gogo.runtime;version='[1.0.0,1.0.1)',\
+	org.apache.servicemix.specs.jaxrs-api-2.1;version='[2.9.1,2.9.2)',\
+	org.jline;version='[3.3.1,3.3.2)'
diff --git a/distribution/multi-bundle/pom.xml b/distribution/multi-bundle/pom.xml
index f6db721..f700702 100644
--- a/distribution/multi-bundle/pom.xml
+++ b/distribution/multi-bundle/pom.xml
@@ -84,15 +84,25 @@
 			</exclusions>
 		</dependency>
 		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.gogo.runtime</artifactId>
-			<version>0.10.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.gogo.shell</artifactId>
-			<version>0.12.0</version>
-		</dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.command</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.command</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.jline</artifactId>
+            <version>1.0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jline</groupId>
+            <artifactId>jline</artifactId>
+            <version>3.3.1</version>
+        </dependency>
 		<dependency>
 			<groupId>org.apache.felix</groupId>
 			<artifactId>org.apache.felix.scr</artifactId>
@@ -200,6 +210,32 @@
 
 		<plugins>
 			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>copy</goal>
+						</goals>
+						<configuration>
+							<artifactItems>
+								<artifactItem>
+									<groupId>org.apache.felix</groupId>
+									<artifactId>org.apache.felix.main</artifactId>
+									<version>${felix.version}</version>
+									<type>jar</type>
+									<overWrite>true</overWrite>
+									<outputDirectory>target/bin</outputDirectory>
+									<destFileName>felix.jar</destFileName>
+								</artifactItem>
+							</artifactItems>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
 				<groupId>biz.aQute.bnd</groupId>
 				<artifactId>bnd-indexer-maven-plugin</artifactId>
 				<version>3.4.0</version>
diff --git a/distribution/multi-bundle/src/main/assembly/assembly.xml b/distribution/multi-bundle/src/main/assembly/assembly.xml
index 12d0b86..a06f61b 100644
--- a/distribution/multi-bundle/src/main/assembly/assembly.xml
+++ b/distribution/multi-bundle/src/main/assembly/assembly.xml
@@ -1,6 +1,6 @@
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+
 <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements. See the NOTICE file
@@ -26,18 +26,33 @@
     <format>dir</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
+  <dependencySets>
+  	<dependencySet>
+  		<includes>
+	  		<include>org.apache.cxf.dosgi.samples:cxf-dosgi-samples-soap-api</include>
+	  		<include>org.apache.cxf.dosgi.samples:cxf-dosgi-samples-soap-impl</include>
+	  		<include>org.apache.cxf.dosgi.samples:cxf-dosgi-samples-soap-client</include>
+	  		<include>org.apache.cxf.dosgi.samples:cxf-dosgi-samples-rest-api</include>
+	  		<include>org.apache.cxf.dosgi.samples:cxf-dosgi-samples-rest-impl</include>
+	  		<include>org.apache.cxf.dosgi.samples:cxf-dosgi-samples-rest-client</include>
+  		</includes>
+  		<outputDirectory>
+  			apache-cxf-dosgi-${dosgi.version}/samples
+  		</outputDirectory>
+  	</dependencySet>
+  </dependencySets>
   <fileSets>
+      <fileSet>
+      	<directory>target/bin</directory>
+      	<outputDirectory>apache-cxf-dosgi-${dosgi.version}/bin</outputDirectory>
+    </fileSet>
     <fileSet>
       <directory>target/distro-unzip/jar</directory>
       <excludes>
       	<exclude>org.apache.felix.framework*</exclude>
       	<exclude>biz.aQute.launcher*</exclude>
       </excludes>
-      <outputDirectory>apache-cxf-dosgi-${dosgi.version}/dosgi_bundles</outputDirectory>
-    </fileSet>
-    <fileSet>
-      <directory>target/distribution_configs</directory>
-      <outputDirectory>apache-cxf-dosgi-${dosgi.version}/conf</outputDirectory>
+      <outputDirectory>apache-cxf-dosgi-${dosgi.version}/bundle</outputDirectory>
     </fileSet>
     <fileSet>
       <directory>target/maven-shared-archive-resources/META-INF</directory>
@@ -48,10 +63,6 @@
     </fileSet>
     <fileSet>
       <directory>src/main/release</directory>
-      <includes>
-        <include>README</include>
-        <include>release_notes.txt</include>
-      </includes>
       <outputDirectory>apache-cxf-dosgi-${dosgi.version}</outputDirectory>
     </fileSet>
   </fileSets>
diff --git a/distribution/multi-bundle/src/main/release/README b/distribution/multi-bundle/src/main/release/README
index b9ade0d..7447c9b 100644
--- a/distribution/multi-bundle/src/main/release/README
+++ b/distribution/multi-bundle/src/main/release/README
@@ -1,14 +1,13 @@
 Apache CXF Distributed OSGi
 ===========================
 
-This distribution combines Aries Remote Service Admin with the CXF-DOSGi providers[2] for JAX-WS and JAX-RS.
+This distribution combines the felix frameworks, Aries Remote Service Admin and CXF-DOSGi
+providers[2] for JAX-WS and JAX-RS.
 
 Getting started
 ---------------
 
-* Download and extract the felix distro
-* Copy the bundles in dosgi-bundles into the bundles directory of the felix distro
-* Start felix like described in the felix readme.
+* Start felix
 
     java -jar bin/felix.jar
 
@@ -16,4 +15,11 @@ Getting started
 
     rsa:endpoints
 
+* The list should be empty at this point
+
+* Deploy samples. Copy soap and rest api and impl from the sample dir to the bundle dir
+* Delete felix-cache
+* Start felix again like above
+* List the endpoints again. This time it should show a REST and a SOAP endpoint
+
 [2] http://cxf.apache.org/distributed-osgi.html
diff --git a/distribution/multi-bundle/src/main/release/conf/config.properties b/distribution/multi-bundle/src/main/release/conf/config.properties
new file mode 100644
index 0000000..bdb587a
--- /dev/null
+++ b/distribution/multi-bundle/src/main/release/conf/config.properties
@@ -0,0 +1,102 @@
+# 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.
+
+#
+# Framework config properties.
+#
+
+# To override the packages the framework exports by default from the
+# class path, set this variable.
+#org.osgi.framework.system.packages=
+
+# To append packages to the default set of exported system packages,
+# set this value.
+#org.osgi.framework.system.packages.extra=
+
+# The following property makes specified packages from the class path
+# available to all bundles. You should avoid using this property.
+#org.osgi.framework.bootdelegation=sun.*,com.sun.*
+
+# Felix tries to guess when to implicitly boot delegate in certain
+# situations to ease integration without outside code. This feature
+# is enabled by default, uncomment the following line to disable it.
+#felix.bootdelegation.implicit=false
+
+# The following property explicitly specifies the location of the bundle
+# cache, which defaults to "felix-cache" in the current working directory.
+# If this value is not absolute, then the felix.cache.rootdir controls
+# how the absolute location is calculated. (See next property)
+#org.osgi.framework.storage=${felix.cache.rootdir}/felix-cache
+
+# The following property is used to convert a relative bundle cache
+# location into an absolute one by specifying the root to prepend to
+# the relative cache path. The default for this property is the
+# current working directory.
+#felix.cache.rootdir=${user.dir}
+
+# The following property controls whether the bundle cache is flushed
+# the first time the framework is initialized. Possible values are
+# "none" and "onFirstInit"; the default is "none".
+#org.osgi.framework.storage.clean=onFirstInit
+
+# The following property determines which actions are performed when
+# processing the auto-deploy directory. It is a comma-delimited list of
+# the following values: 'install', 'start', 'update', and 'uninstall'.
+# An undefined or blank value is equivalent to disabling auto-deploy
+# processing.
+felix.auto.deploy.action=install,start
+
+# The following property specifies the directory to use as the bundle
+# auto-deploy directory; the default is 'bundle' in the working directory.
+#felix.auto.deploy.dir=bundle
+
+# The following property is a space-delimited list of bundle URLs
+# to install when the framework starts. The ending numerical component
+# is the target start level. Any number of these properties may be
+# specified for different start levels.
+#felix.auto.install.1=
+
+# The following property is a space-delimited list of bundle URLs
+# to install and start when the framework starts. The ending numerical
+# component is the target start level. Any number of these properties
+# may be specified for different start levels.
+#felix.auto.start.1=
+
+felix.log.level=1
+
+# Sets the initial start level of the framework upon startup.
+#org.osgi.framework.startlevel.beginning=1
+
+# Sets the start level of newly installed bundles.
+#felix.startlevel.bundle=1
+
+# Felix installs a stream and content handler factories by default,
+# uncomment the following line to not install them.
+#felix.service.urlhandlers=false
+
+# The launcher registers a shutdown hook to cleanly stop the framework
+# by default, uncomment the following line to disable it.
+#felix.shutdown.hook=false
+
+#
+# Bundle config properties.
+#
+
+org.osgi.service.http.port=8181
+obr.repository.url=http://felix.apache.org/obr/releases.xml
+felix.fileinstall.dir=./etc
+felix.fileinstall.noInitialDelay=true
diff --git a/distribution/multi-bundle/src/main/release/etc/org.ops4j.pax.logging.cfg b/distribution/multi-bundle/src/main/release/etc/org.ops4j.pax.logging.cfg
new file mode 100644
index 0000000..b081a42
--- /dev/null
+++ b/distribution/multi-bundle/src/main/release/etc/org.ops4j.pax.logging.cfg
@@ -0,0 +1,7 @@
+log4j.rootLogger=INFO, stdout
+log4j.logger.org.apache.cxf.bus.blueprint=ERROR
+log4j.logger.org.apache.cxf.bus.osgi.CXFActivator=WARN
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %40.40c | %m%n
diff --git a/itests/multi-bundle/src/test/java/org/apache/cxf/dosgi/itests/multi/MultiBundleTools.java b/itests/multi-bundle/src/test/java/org/apache/cxf/dosgi/itests/multi/MultiBundleTools.java
index 4150fda..cf97af7 100644
--- a/itests/multi-bundle/src/test/java/org/apache/cxf/dosgi/itests/multi/MultiBundleTools.java
+++ b/itests/multi-bundle/src/test/java/org/apache/cxf/dosgi/itests/multi/MultiBundleTools.java
@@ -35,7 +35,7 @@ public final class MultiBundleTools {
 
     private static Collection<String> getDistroBundles(File distroDir) throws Exception {
         List<String> bundles = new ArrayList<>();
-        File bundlesDir = new File(distroDir, "dosgi_bundles");
+        File bundlesDir = new File(distroDir, "bundle");
         File[] files = bundlesDir.listFiles(new FilenameFilter() {
                 public boolean accept(File dir, String name) {
                     return name.toLowerCase().endsWith(".jar");

-- 
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].