You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/17 19:03:09 UTC

[jira] [Commented] (KARAF-2511) Review and update documentation

    [ https://issues.apache.org/jira/browse/KARAF-2511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584282#comment-16584282 ] 

ASF GitHub Bot commented on KARAF-2511:
---------------------------------------

jbonofre closed pull request #484: [KARAF-2511] Add examples in the distribution
URL: https://github.com/apache/karaf/pull/484
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/assemblies/apache-karaf/pom.xml b/assemblies/apache-karaf/pom.xml
index 463dc02c27..5278fd35e7 100644
--- a/assemblies/apache-karaf/pom.xml
+++ b/assemblies/apache-karaf/pom.xml
@@ -70,12 +70,6 @@
             <type>xml</type>
             <scope>runtime</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.karaf</groupId>
-            <artifactId>demos</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 
     <build>
@@ -89,42 +83,15 @@
                     <include>RELEASE*</include>
                     <include>LICENSE</include>
                     <include>NOTICE</include>
+                    <include>examples/**/*</include>
                 </includes>
-            </resource>
-            <resource>
-                <directory>${project.build.directory}/demos</directory>
-                <filtering>false</filtering>
                 <excludes>
-                    <exclude>**/*.i??</exclude>
-                    <exclude>**/.target</exclude>
-                    <exclude>**/.classpath</exclude>
+                    <exclude>examples/**/target/**/*</exclude>
+                    <exclude>**/*.iml</exclude>
                 </excludes>
             </resource>
         </resources>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <artifactItems>
-                        <artifactItem>
-                            <groupId>org.apache.karaf</groupId>
-                            <artifactId>demos</artifactId>
-                            <version>${project.version}</version>
-                        </artifactItem>
-                    </artifactItems>
-                    <outputDirectory>${project.build.directory}/demos/demos</outputDirectory>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
diff --git a/assemblies/demos/pom.xml b/assemblies/demos/pom.xml
deleted file mode 100644
index 1b591968b8..0000000000
--- a/assemblies/demos/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.assemblies</groupId>
-        <artifactId>assemblies</artifactId>
-        <version>4.2.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <groupId>org.apache.karaf</groupId>
-    <artifactId>demos</artifactId>
-    <packaging>jar</packaging>
-    <name>Apache Karaf :: Assemblies :: Demos</name>
-
-    <properties>
-        <appendedResourcesDirectory>${basedir}/../etc/appended-resources</appendedResourcesDirectory>
-    </properties>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>${project.basedir}/../../demos</directory>
-                <filtering>false</filtering>
-                <excludes>
-                    <exclude>**/target/**</exclude>
-                    <exclude>**/README.txt</exclude>
-                    <exclude>**/.project</exclude>
-                    <exclude>**/.classpath</exclude>
-                    <exclude>**/.settings/**</exclude>
-                    <exclude>**/*.iws</exclude>
-                    <exclude>**/*.iwl</exclude>
-                </excludes>
-            </resource>
-            <resource>
-                <directory>${project.basedir}/../../demos</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/README.txt</include>
-                </includes>
-            </resource>
-        </resources>
-    </build>
-
-</project>
diff --git a/assemblies/pom.xml b/assemblies/pom.xml
index 9769bd7710..635a3fdeb5 100644
--- a/assemblies/pom.xml
+++ b/assemblies/pom.xml
@@ -35,7 +35,6 @@
 
     <modules>
         <module>features</module>
-        <module>demos</module>
         <module>apache-karaf-minimal</module>
         <module>apache-karaf</module>
     </modules>
diff --git a/demos/branding/README.txt b/demos/branding/README.txt
deleted file mode 100644
index f8fceb7ec8..0000000000
--- a/demos/branding/README.txt
+++ /dev/null
@@ -1,69 +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.
- */
-
-BRANDING SHELL EXAMPLE
-======================
-
-Purpose
--------
-Demonstrate how to change the shell console branding.
-
-
-Prerequisites for Running this Example
---------------------------------------
-You must have the following installed on your machine:
-
-   - JDK 1.6 or higher.
-
-   - Apache Maven 3.0.3 or higher.
-
-
-Building and Deploying
-----------------------
-This example will produce a branding jar, containing a branding properties
-file which is used to generate the shell console branding.
-
-To build the demo branding type the following command:
-
-  mvn install
-
-To deploy the branding copy the resulting jar file to karaf/lib folder.
-
-  cp target/org.apache.karaf.demos.branding.shell-${version}.jar $KARAF_HOME/lib
-
-In order for Karaf to pick up the branding jar please edit the
-$KARAF_HOME/etc/custom.properties file to include the following:
-
-  org.osgi.framework.system.packages.extra = \
-    org.apache.karaf.branding; \
-    com.sun.org.apache.xalan.internal.xsltc.trax; \
-    com.sun.org.apache.xerces.internal.dom; \
-    com.sun.org.apache.xerces.internal.jaxp; \
-    com.sun.org.apache.xerces.internal.xni
-
-To see the new branding please restart Karaf:
-
-  cd $KARAF_HOME/bin
-  ./karaf
-
-The shell console should now display the content of the branding
-properties file.
-
-NOTES
-=====
-Most projects automate this process. One such project is Apache Servicemix
-NMR, see its branding and assembly poms for a guide line.
diff --git a/demos/command/README.txt b/demos/command/README.txt
deleted file mode 100644
index 08b96cbf86..0000000000
--- a/demos/command/README.txt
+++ /dev/null
@@ -1,60 +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.
- */
- 
-EXTEND CONSOLE COMMAND EXAMPLE
-==============================
-
-Purpose
--------
-Demonstrate how to extend a console command. 
-
-
-Prerequisites for Running this Example
---------------------------------------
-You must have the following installed on your machine:
-
-   - JDK 1.6 or higher.
-
-   - Apache Maven 3.0.3 or higher.
-
-
-Building and Deploying
-----------------------
-This example will produce a bundle, containing a custom command
-and its command completer.
-
-To build the demo console command invoke the following command:
-
-  mvn install
-
-To deploy the console command invoke the following command on the Karaf
-console: 
-  > bundle:install -s mvn:org.apache.karaf.demos/org.apache.karaf.demos.command/${version}
-
-Upon successful installation the bundle ID will be presented.
-
-To test the custom command type the following on the Karaf console:
-
-  karaf@root> mycommand:hello 
-  Executing My Command Demo
-  karaf@root>
-
-To test the command completer press tab after typing the first few
-characters of 'mycommand'.
-
-For more information on Extending Karaf Console Commands please visit:
-http://karaf.apache.org/manual/${pom.version}/developers-guide/extending-console.html
diff --git a/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java b/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java
deleted file mode 100644
index 5d9cb325df..0000000000
--- a/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java
+++ /dev/null
@@ -1,40 +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.karaf.demos.command;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.Completion;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "mycommand", name = "hello", description="Says hello")
-@Service
-public class MyCommand implements Action {
-
-    @Argument(index = 0, name = "arg", description = "The command argument", required = false, multiValued = false)
-    @Completion(MyCompleter.class)
-    String arg = null;
-
-    @Override
-    public Object execute() throws Exception {
-        System.out.println("Executing My Command Demo");
-        return null;
-    }
-}
diff --git a/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java b/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java
deleted file mode 100644
index fa6828ef8f..0000000000
--- a/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java
+++ /dev/null
@@ -1,46 +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.karaf.demos.command;
-
-import java.util.List;
-
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.karaf.shell.api.console.CommandLine;
-import org.apache.karaf.shell.api.console.Completer;
-import org.apache.karaf.shell.api.console.Session;
-import org.apache.karaf.shell.support.completers.StringsCompleter;
-
-/**
-* <p>
-* My completer.
-* </p>
-*/
-
-@Service
-public class MyCompleter implements Completer {
-
-    public int complete(Session session, CommandLine commandLine, List<String> candidates) {
-
-        StringsCompleter delegate = new StringsCompleter();
-        delegate.getStrings().add("one");
-        delegate.getStrings().add("two");
-        delegate.getStrings().add("three");
-        return delegate.complete(session, commandLine, candidates);
-    }
-}
diff --git a/demos/deployer/bundle/README.TXT b/demos/deployer/bundle/README.TXT
deleted file mode 100644
index 3fa4f2e573..0000000000
--- a/demos/deployer/bundle/README.TXT
+++ /dev/null
@@ -1,86 +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.
- */
-
-Karaf Bundle EXAMPLE
-====================
-
-Purpose
--------
-Demonstrate how to build an OSGi Bundle.
-
-
-Prerequisites for Running this Example
---------------------------------------
-You must have the following installed on your machine:
-
-   - JDK 1.6 or higher.
-
-   - Apache Maven 3.0.3 or higher.
-
-
-Building and Deploying
-----------------------
-This example will produce an OSGi bundle (a special type
-of Java Archive (jar).
-
-To build the demo bundle invoke the following command:
-
-  mvn install
-
-To deploy the newly created bundle you may either directly
-copy the generated my-bundle-1.0.0-SNAPSHOT.jar to the deploy
-directory, or issue the following command on the Karaf
-console:
-
-  karaf@root> bundle:install -s mvn:org.apache.karaf.demos.deployer.bundle/my-bundle/1.0.0-SNAPSHOT
-  Starting the Apache Karaf demo bundle
-  Bundle ID: 73 
-
-Upon installation the bundle was immediately started, printing
-the message in its activator's start method. To further verify
-its successful deployment invoke the following:
-
-  karaf@root> list
-  START LEVEL 100 , List Threshold: 50
-   ID   State         Level  Name
-  [  73] [    Active] [   80] Apache Karaf :: Demos :: Deployer :: Bundle (1.0.0.SNAPSHOT)
-
-The bundle may be started or stopped via the start and stop
-commands. A message will be printed to the console each time
-this occurs. 
-
-Note: Using Karaf archetype to generate a bundle project:
----------------------------------------------------------
-
-The karaf-bundle-archetype creates a Maven skeleton project
-to build an OSGi bundle with Activator (a special callback
-class for bundle start/stop).
-
-On the command line issue the following command to create
-a bundle project:
-
-  mvn archetype:generate \
-      -DarchetypeGroupId=org.apache.karaf.archetypes \ 
-      -DarchetypeArtifactId=karaf-bundle-archetype \ 
-      -DarchetypeVersion=${version} \ 
-      -DgroupId=org.myorg \
-      -DartifactId=my-bundle \ 
-      -Dversion=1.0-SNAPSHOT \ 
-      -Dpackage=org.myorg.package
-
-For more information on using the karaf-bundle-archetype
-please visit: http://karaf.apache.org/manual/latest-3.0.x/developers-guide/archetypes.html
diff --git a/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java b/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java
deleted file mode 100644
index 063aa17b42..0000000000
--- a/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java
+++ /dev/null
@@ -1,34 +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.karaf.demos.deployer.bundle;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
-    public void start(BundleContext context) {
-        System.out.println("Starting the Apache Karaf demo bundle");
-    }
-
-    public void stop(BundleContext context) {
-        System.out.println("Stopping the Apache Karaf demo bundle");
-    }
-
-}
diff --git a/demos/deployer/kar/.gitignore b/demos/deployer/kar/.gitignore
deleted file mode 100644
index c699181324..0000000000
--- a/demos/deployer/kar/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-src/main/feature/maven-metadata-local.xml
-
diff --git a/demos/deployer/kar/README.txt b/demos/deployer/kar/README.txt
deleted file mode 100644
index c412c60da8..0000000000
--- a/demos/deployer/kar/README.txt
+++ /dev/null
@@ -1,73 +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.
- */
-
-Karaf Archive (kar)  EXAMPLE
-==============================
-
-Purpose
--------
-Demonstrate how to create Karaf Archives.
-
-
-Prerequisites for Running this Example
---------------------------------------
-You must have the following installed on your machine:
-
-   - JDK 1.6 or higher.
-
-   - Apache Maven 3.0.3 or higher.
-
-
-Building and Deploying
-----------------------
-This example will produce a kar, containing a bundle. 
-
-To build the demo kar invoke the following command:
-
-  mvn install
-
-Karaf provides a KAR deployer:
-
-  karaf@root> la | grep -i archive
-  [  15] [Active     ] [Created     ] [   30] Apache Karaf :: Deployer :: Karaf Archive (.kar) (${pom.version})
-
-It's a core deployer (you don't need to install additional features).
-
-To deploy a kar, simply drop the kar into the deploy directory. 
-The KAR Deployer will deploy all the kar content starting from
-the features descriptor.
-
-The KAR Deployer is able to extract the archives into the system
-folder and automaticallly install the shipped features.
-
-You can now see your feature available for installation:
-
-  karaf@root> feature:list | grep -i my-kar
-  [installed] [1.0             ] my  
-
-Now you can use any commands available on features:
-
-  karaf@root> feature:info my-kar
-  Feature my-kar 1.0
-  Feature has no configuration
-  Feature has no configuration files
-  Feature has no dependencies.
-  Feature contains followed bundles:
-    mvn:commons-collections/commons-collections/3.2.1
-
-For more information on Karaf Archives please visit:
-http://karaf.apache.org/manual/${pom.version}/users-guide/kar.html
diff --git a/demos/dump/README.txt b/demos/dump/README.txt
deleted file mode 100644
index 78753851e3..0000000000
--- a/demos/dump/README.txt
+++ /dev/null
@@ -1,68 +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.
- */
-
-DUMP PROVIDER EXAMPLE
-======================
-
-Purpose
--------
-This demo provider creates images in dump destination which contains 
-screenshots from all attached displays.
-
-
-Prerequisites for Running this Example
---------------------------------------
-You must have the following installed on your machine:
-
-   - JDK 1.6 or higher.
-
-   - Apache Maven 3.0.3 or higher.
-
-
-Building and Deploying
-----------------------
-
-To build the dump provider demo type the following command:
-
-  mvn install
-
-This will create in the target folder dump-${version}.jar.
-
-To install, copy dump-${version}.jar into Karaf's deploy folder.
-
-To execute the demo issue the create-dump command as follows:
-
-  karaf@root> create-dump
-  Diagnostic dump created.
-  karaf@root> 
-
-This will create a time stamped zip folder which contains the
-Karaf log, a list of bundles, threads, features, and a subfolder
-containing screenshots of attached displays.
-
-Unzipping a sample dump file produces:
-
-  unzip 2012-02-06_185732.zip 
-  Archive:  2012-02-06_185732.zip
-  inflating: log/karaf.log           
-  inflating: bundles.txt             
-  inflating: screenshot/display_0.png  
-  inflating: screenshot/display_1.png  
-  inflating: threads.txt             
-  inflating: features.txt
-
-Note: The above system had two displays.
diff --git a/demos/web/README.txt b/demos/web/README.txt
deleted file mode 100644
index 07476d9038..0000000000
--- a/demos/web/README.txt
+++ /dev/null
@@ -1,125 +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.
- */
-
-Embedding Karaf in a WebContainer
-=================================
-
-Purpose
--------
-This demo shows how to package Karaf as a webapplication (war) ready to be deployed in a webcontainer like
-Apache Tomcat.
-
-It also shows how to override some configuration files to automatically install a HTTP bridge.
-
-Prerequisites for Running the Example
--------------------------------------
-You must have the following installed on your machine:
-
-  - JDK 1.7 or higher
-
-  - Maven 3.2.3 or higher
-
-
-Building and Deploying
-----------------------
-You can build and deploy this example in two ways:
-
-- A. Using Jetty: Quick and Easy
-  This option is useful if you want to see the example up and
-  running quickly.
-   
-- B. Using Your Favorite WebContainer (like Apache Tomcat)
-  This option is useful if you want to see Karaf running
-  as a web application inside your favorite web container.
-
-
-A. Using Jetty: Quick and Easy
-------------------------------
-To build the example and deploy to Jetty, complete the
-following steps:
-
-1. In a command prompt/shell, change to the directory
-   that contains this README.txt file.
-
-2. Enter the following Maven command:
-
-     mvn package jetty:run
-
-This Maven command builds the example web application, starts
-Jetty and deploys the web application to Jetty. Once complete,
-you should see the following printed to the console:
-
-[INFO] Started Jetty Server
-[INFO] Starting scanner at interval of 10 seconds.
-
-Running a Client
-----------------
-To test the example, you can use the Apache Karaf client
-to connect to the server and issue a Karaf command. For example,
-try executing the "features:list" command as follows:
-
-1. In a command prompt/shell, change to your product
-   installation directory.
-
-2. Run the following commands:
-
-    Unix:
-        ${KARAF_HOME}/bin/client feature:list
-
-    Windows:
-        %KARAF_HOME%\bin\client.bat feature:list
-
-    Using JDK:
-        java -jar lib/bin/karaf-client.jar features:list
-
-In this case, you should see output similar to the following:
-
-(abbreviated output below)
-
-State         Version           Name              Repository                   Description
-[uninstalled] [${version} ] wrapper           standard-${version}      Provide OS integration
-[uninstalled] [${version} ] obr               standard-${version}      Provide OSGi Bundle Repository (OBR) support
-[uninstalled] [${version} ] config            standard-${version}      Provide OSGi ConfigAdmin support
-[uninstalled] [${version} ] region            standard-${version}      Provide Region commands
-[uninstalled] [7.5.4.v20111024] jetty             standard-${version}      Provide Jetty engine support
-[uninstalled] [${version} ] http              standard-${version}      Implementation of the OSGI HTTP Service
-[uninstalled] [${version} ] http-whiteboard   standard-${version}      Provide HTTP Whiteboard pattern support
-[uninstalled] [${version} ] war               standard-${version}      Turn Karaf as a full WebContainer
-[uninstalled] [${version} ] deployers         standard-${version}      Provide Karaf deployer
-[uninstalled] [${version} ] kar               standard-${version}      Provide KAR (KARaf archive) support
-[uninstalled] [${version} ] webconsole-base   standard-${version}      Base support of the Karaf WebConsole
-[uninstalled] [${version} ] webconsole        standard-${version}      Karaf WebConsole for administration and monitoring
-[uninstalled] [${version} ] ssh               standard-${version}      Provide a SSHd server on Karaf
-
-
-B. Using Your Favorite Web Container
-------------------------------------
-You can deploy the web application to your favorite web
-container, by completing the following steps:
-
-1. In a command prompt/shell, change to the directory
-   that contains this README.txt file.
-   
-2. Enter the following command:
-
-     mvn package
-     
-Maven builds the web application, web-${version}.war, and
-saves it in the target directory of this example. Deploy this
-WAR file to your favorite web container. Once the application
-is running, you can test it using the Apache Karaf client
-as described in the "Running a Client" section above.
diff --git a/demos/web/pom.xml b/demos/web/pom.xml
deleted file mode 100644
index 7de42e44ad..0000000000
--- a/demos/web/pom.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>demos</artifactId>
-        <version>4.2.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>web</artifactId>
-    <packaging>war</packaging>
-    <name>Apache Karaf :: Demos :: Web</name>
-
-    <properties>
-        <jetty.port>8080</jetty.port>
-        <maven-jetty-plugin.version>6.1.26</maven-jetty-plugin.version>
-        <geronimo.servlet.version>1.1.2</geronimo.servlet.version>
-
-        <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.jaas</groupId>
-            <artifactId>org.apache.karaf.jaas.boot</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.diagnostic</groupId>
-            <artifactId>org.apache.karaf.diagnostic.boot</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf</groupId>
-            <artifactId>org.apache.karaf.main</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf</groupId>
-            <artifactId>apache-karaf</artifactId>
-            <type>zip</type>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <version>${geronimo.servlet.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.http.proxy</artifactId>
-            <version>3.0.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.http.bridge</artifactId>
-            <version>3.0.0</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-war-plugin</artifactId>
-                <configuration>
-                    <warSourceDirectory>src/main/webapp/</warSourceDirectory>
-                    <webResources>
-                        <resource>
-                            <directory>target/karaf</directory>
-                        </resource>
-                    </webResources>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
-                <version>${maven-jetty-plugin.version}</version>
-                <configuration>
-                    <connectors>
-                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
-                            <port>${jetty.port}</port>
-                            <maxIdleTime>60000</maxIdleTime>
-                        </connector>
-                    </connectors>
-                    <systemProperties>
-                        <!-- enable easy connection to JConsole -->
-                        <systemProperty>
-                            <name>com.sun.management.jmxremote</name>
-                            <value />
-                        </systemProperty>
-                    </systemProperties>
-                    <scanIntervalSeconds>10</scanIntervalSeconds>
-                    <webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack-unix</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.karaf</groupId>
-                                    <artifactId>apache-karaf</artifactId>
-                                    <type>zip</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/karaf/WEB-INF</outputDirectory>
-                                    <excludes>**/lib/*,**/*.txt,**/bin/*,**/demos/**,**/lib,**/bin,**/demos,**/startup.properties,**/config.properties,**/org.apache.felix.http.bridge-3.0.0.jar</excludes>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-karaf</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <target>
-                                <move todir="${project.build.directory}/karaf/WEB-INF/karaf">
-                                    <fileset dir="${project.build.directory}/karaf/WEB-INF/apache-karaf-${project.version}" />
-                                </move>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git a/demos/web/src/main/java/org/apache/karaf/web/WebAppListener.java b/demos/web/src/main/java/org/apache/karaf/web/WebAppListener.java
deleted file mode 100644
index db08a14170..0000000000
--- a/demos/web/src/main/java/org/apache/karaf/web/WebAppListener.java
+++ /dev/null
@@ -1,63 +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.karaf.web;
-
-import java.io.File;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-import org.apache.karaf.main.Main;
-
-public class WebAppListener implements ServletContextListener {
-
-	private Main main;
-
-	public void contextInitialized(ServletContextEvent sce) {
-		try {
-			System.err.println("contextInitialized");
-			String root = new File(sce.getServletContext().getRealPath("/") + "/WEB-INF/karaf").getAbsolutePath();
-			System.err.println("Root: " + root);
-			System.setProperty("karaf.home", root);
-            System.setProperty("karaf.base", root);
-            System.setProperty("karaf.data", root + "/data");
-            System.setProperty("karaf.etc", root + "/etc");
-            System.setProperty("karaf.history", root + "/data/history.txt");
-            System.setProperty("karaf.instances", root + "/instances");
-			System.setProperty("karaf.startLocalConsole", "false");
-			System.setProperty("karaf.startRemoteShell", "true");
-            System.setProperty("karaf.lock", "false");
-			main = new Main(new String[0]);
-            main.launch();
-		} catch (Exception e) {
-			main = null;
-			e.printStackTrace();
-		}
-	}
-
-	public void contextDestroyed(ServletContextEvent sce) {
-		try {
-			System.err.println("contextDestroyed");
-			if (main != null) {
-                main.destroy();
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-}
\ No newline at end of file
diff --git a/demos/web/src/main/webapp/WEB-INF/karaf/etc/config.properties b/demos/web/src/main/webapp/WEB-INF/karaf/etc/config.properties
deleted file mode 100644
index 5315f344a0..0000000000
--- a/demos/web/src/main/webapp/WEB-INF/karaf/etc/config.properties
+++ /dev/null
@@ -1,387 +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.
-#
-################################################################################
-
-#
-# This file lists Karaf default settings for this particular version of Karaf.
-# For easier maintenance when upgrading Karaf and to better document which
-# default values have changed, it is recommended to place any changes to
-# these values in a custom.properties file in the same folder as this file.
-# Each value specified in custom.properties will override the default value
-# here.
-#
-
-#
-# Properties file inclusions (as a space separated list of relative paths)
-# Included files will override the values specified in this file
-# NB: ${includes} properties files are mandatory, it means that Karaf will not start
-# if the include file is not found
-#
-${includes} = jre.properties custom.properties
-
-#
-# Properties file inclusions (as a space separated list of relative paths)
-# Included files will override the values specified in this file
-# NB: ${optionals} properties files are optionals, it means that Karaf will just
-# display a warning message but the bootstrap will be performed
-#
-# ${optionals} = my.properties
-
-#
-# Framework selection properties
-#
-karaf.framework=felix
-
-#
-# Location of the OSGi frameworks
-#
-karaf.framework.equinox=mvn\:org.eclipse.birt.runtime/org.eclipse.osgi/3.10.2.v20150203-1939
-karaf.framework.felix=mvn\:org.apache.felix/org.apache.felix.framework/5.4.0
-
-#
-# Framework config properties.
-#
-org.osgi.framework.system.packages= \
- org.osgi.dto;version="1.0",\
- org.osgi.resource;version="1.0",\
- org.osgi.resource.dto;version="1.0";uses:="org.osgi.dto",\
- org.osgi.framework;version="1.8",\
- org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",\
- org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framework",\
- org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",\
- org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",\
- org.osgi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",\
- org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",\
- org.osgi.framework.namespace;version="1.1";uses:="org.osgi.resource",\
- org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",\
- org.osgi.framework.startlevel.dto;version="1.0";uses:="org.osgi.dto",\
- org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",\
- org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi.dto,org.osgi.resource.dto",\
- org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",\
- org.osgi.service.packageadmin;version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",\
- org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",\
- org.osgi.service.startlevel;version="1.1";uses:="org.osgi.framework",\
- org.osgi.service.url;version="1.0",\
- org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",\
- org.apache.karaf.version;version="4.0.4.SNAPSHOT",\
- javax.servlet;version="3.1",\
- javax.servlet.annotation;version="3.1",\
- javax.servlet.descriptor;version="3.1",\
- javax.servlet.http;version="3.1",\
- org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.0.4.SNAPSHOT",\
- org.apache.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.0.4.SNAPSHOT",\
- ${jre-${java.specification.version}}
-
-#
-# Extra packages appended after standard packages
-#
-org.osgi.framework.system.packages.extra = \
-    org.apache.karaf.branding, \
-    org.apache.karaf.jaas.boot.principal, \
-    org.apache.karaf.jaas.boot, \
-    sun.misc, \
-    javax.xml.ws;uses:=\"javax.xml.bind,javax.xml.bind.annotation,javax.xml.namespace,javax.xml.transform,javax.xml.ws.handler,javax.xml.ws.spi,javax.xml.ws.spi.http,org.w3c.dom\";version=2.2, \
-    javax.xml.ws.handler;uses:=\"javax.xml.namespace,javax.xml.ws\";version=2.2, \
-    javax.xml.ws.handler.soap;uses:=\"javax.xml.bind,javax.xml.namespace,javax.xml.soap,javax.xml.ws.handler\";version=2.2, \
-    javax.xml.ws.http;uses:=javax.xml.ws;version=2.2, \
-    javax.xml.ws.soap;uses:=\"javax.xml.soap,javax.xml.ws,javax.xml.ws.spi\";version=2.2, \
-    javax.xml.ws.spi;uses:=\"javax.xml.bind,javax.xml.namespace,javax.xml.transform,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.wsaddressing,org.w3c.dom\";version=2.2, \
-    javax.xml.ws.spi.http;version=2.2, \
-    javax.xml.ws.wsaddressing;uses:=\"javax.xml.bind.annotation,javax.xml.namespace,javax.xml.transform,javax.xml.ws,org.w3c.dom\";version=2.2, \
-    javax.xml.bind;uses:=\"javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.namespace,javax.xml.stream,javax.xml.transform,javax.xml.validation,org.w3c.dom,org.xml.sax\";version=2.2.1, \
-    javax.xml.bind.annotation;uses:=\"javax.xml.bind,javax.xml.parsers,javax.xml.transform,javax.xml.transform.dom,org.w3c.dom\";version=2.2.1, \
-    javax.xml.bind.annotation.adapters;version=2.2.1, \
-    javax.xml.bind.attachment;uses:=javax.activation;version=2.2.1, \
-    javax.xml.bind.helpers;uses:=\"javax.xml.bind,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.stream,javax.xml.transform,javax.xml.validation,org.w3c.dom,org.xml.sax\";version=2.2.1, \
-    javax.xml.bind.util;uses:=\"javax.xml.bind,javax.xml.transform.sax\";version=2.2.1, \
-    javax.xml.stream;uses:=\"javax.xml.namespace,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform\";version=1.2, \
-    javax.xml.stream.events;uses:=\"javax.xml.namespace,javax.xml.stream\";version=1.2, \
-    javax.xml.stream.util;uses:=\"javax.xml.namespace,javax.xml.stream,javax.xml.stream.events\";version=1.2, \
-    javax.annotation;version=1.2, \
-    javax.annotation.security;version=1.2, \
-    javax.annotation.sql;version=1.2, \
-    javax.xml;version=1.4, \
-    javax.xml.datatype;uses:=javax.xml.namespace;version=1.4, \
-    javax.xml.namespace;version=1.4, \
-    javax.xml.parsers;uses:=\"javax.xml.validation,org.w3c.dom,org.xml.sax,org.xml.sax.helpers\";version=1.4, \
-    javax.xml.transform;version=1.4, \
-    javax.xml.transform.dom;uses:=\"javax.xml.transform,org.w3c.dom\";version=1.4, \
-    javax.xml.transform.sax;uses:=\"javax.xml.transform,org.xml.sax,org.xml.sax.ext\";version=1.4, \
-    javax.xml.transform.stax;uses:=\"javax.xml.stream,javax.xml.transform\";version=1.4, \
-    javax.xml.transform.stream;uses:=javax.xml.transform;version=1.4, \
-    javax.xml.validation;uses:=\"javax.xml.transform,org.w3c.dom,org.w3c.dom.ls,org.xml.sax\";version=1.4, \
-    javax.xml.xpath;uses:=\"javax.xml.namespace,org.xml.sax\";version=1.4, \
-    org.w3c.dom;version=1.0, \
-    org.w3c.dom.bootstrap;uses:=org.w3c.dom;version=1.0, \
-    org.w3c.dom.css;uses:=\"org.w3c.dom,org.w3c.dom.stylesheets,org.w3c.dom.views\";version=1.0, \
-    org.w3c.dom.events;uses:=\"org.w3c.dom,org.w3c.dom.views\";version=1.0, \
-    org.w3c.dom.html;uses:=org.w3c.dom;version=1.0, \
-    org.w3c.dom.ls;uses:=\"org.w3c.dom,org.w3c.dom.events,org.w3c.dom.traversal\";version=1.0, \
-    org.w3c.dom.ranges;uses:=org.w3c.dom;version=1.0, \
-    org.w3c.dom.stylesheets;uses:=org.w3c.dom;version=1.0, \
-    org.w3c.dom.traversal;uses:=org.w3c.dom;version=1.0, \
-    org.w3c.dom.views;version=1.0, \
-    org.w3c.dom.xpath;uses:=org.w3c.dom;version=1.0, \
-    org.xml.sax;version=2.0.2, \
-    org.xml.sax.ext;uses:=\"org.xml.sax,org.xml.sax.helpers\";version=2.0.2, \
-    org.xml.sax.helpers;uses:=org.xml.sax;version=2.0.2, \
-    org.apache.xml.serializer;uses:=\"org.xml.sax.helpers,org.xml.sax,org.apache.xml.serializer.utils,javax.xml.transform,org.w3c.dom.ls,org.w3c.dom,org.xml.sax.ext,org.apache.xml.serializer.dom3\";version=2.7.2, \
-    org.apache.xml.serializer.utils;uses:=\"org.w3c.dom,org.xml.sax,javax.xml.transform\";version=2.7.2, \
-    org.apache.xml.serializer.dom3;uses:=\"org.apache.xml.serializer,org.w3c.dom.ls,org.apache.xml.serializer.utils,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers\";version=2.7.2, \
-    javax.activation;version=1.1, \
-    javax.xml.soap;uses:=\"javax.activation,javax.xml.namespace,javax.xml.transform,javax.xml.transform.dom,org.w3c.dom\";version=1.3, \
-    java_cup.runtime;version=2.7.2, \
-    org.apache.xalan.serialize;uses:=\"org.apache.xml.serializer,org.xml.sax,org.w3c.dom,org.apache.xml.utils,org.apache.xml.dtm,org.apache.xpath,javax.xml.transform,org.apache.xalan.transformer,org.apache.xpath.objects\";version=2.7.2, \
-    org.apache.xalan.xsltc.cmdline.getopt;uses:=org.apache.xalan.xsltc.compiler.util;version=2.7.2, \
-    org.apache.xalan.xsltc.cmdline;uses:=\"org.apache.xalan.xsltc.cmdline.getopt,org.apache.xalan.xsltc.compiler,org.apache.xalan.xsltc.compiler.util,org.apache.xml.dtm,javax.xml.parsers,org.xml.sax,org.apache.xalan.xsltc.runtime,org.apache.xalan.xsltc.runtime.output,org.apache.xml.serializer,org.apache.xalan.xsltc,javax.xml.transform,javax.xml.transform.sax,org.apache.xalan.xsltc.dom\";version=2.7.2, \
-    org.apache.xalan.lib.sql;uses:=\"org.apache.xalan.res,org.w3c.dom,org.xml.sax,org.apache.xml.utils,org.apache.xml.dtm,org.xml.sax.ext,javax.xml.transform,org.apache.xml.dtm.ref,javax.naming,org.apache.xpath,org.apache.xalan.extensions,org.apache.xpath.objects\";version=2.7.2, \
-    org.apache.xalan.xsltc.runtime.output;uses:=\"org.apache.xml.serializer,org.xml.sax.ext,javax.xml.parsers,org.apache.xalan.xsltc.trax,org.w3c.dom,org.xml.sax\";version=2.7.2, \
-    org.apache.xalan;version=2.7.2, \
-    org.apache.xalan.templates;uses:=\"org.apache.xml.utils,org.apache.xpath,org.apache.xalan.res,javax.xml.transform,org.xml.sax,org.apache.xalan.processor,org.apache.xpath.objects,org.apache.xpath.compiler,org.apache.xpath.axes,org.apache.xpath.operations,org.apache.xpath.functions,org.apache.xalan.trace,org.apache.xalan.transformer,org.apache.xml.serializer,org.apache.xml.dtm,org.apache.xalan.serialize,org.apache.xml.dtm.ref,org.apache.xalan.extensions,org.w3c.dom,org.apache.xml.utils.res,org.xml.sax.helpers,org.apache.xpath.patterns\";version=2.7.2, \
-    org.apache.xalan.xsltc.compiler;uses:=\"org.apache.bcel.generic,org.apache.xalan.xsltc.compiler.util,org.apache.xml.utils,java_cup.runtime,org.apache.xml.serializer,org.apache.xalan.xsltc.runtime,org.xml.sax,org.apache.bcel.util,org.apache.bcel.classfile,javax.xml.parsers,org.apache.xml.dtm\";version=2.7.2, \
-    org.apache.xalan.extensions;uses:=\"org.apache.xml.utils,org.apache.xpath,javax.xml.transform,org.apache.xpath.objects,org.w3c.dom.traversal,org.w3c.dom,org.apache.xalan.templates,org.apache.xpath.functions,org.apache.xalan.transformer,org.apache.xalan.res,org.apache.xml.dtm,org.apache.xml.dtm.ref,org.apache.xalan.trace,javax.xml.namespace,javax.xml.xpath,org.apache.xpath.axes,org.apache.xalan.serialize,org.xml.sax,org.apache.xml.serializer\";version=2.7.2, \
-    org.apache.xalan.transformer;uses:=\"org.apache.xml.utils,org.apache.xml.dtm,org.apache.xml.serializer,org.apache.xalan.serialize,org.xml.sax.ext,javax.xml.transform,org.xml.sax,org.apache.xpath,org.apache.xalan.templates,org.apache.xpath.axes,org.apache.xalan.res,org.apache.xpath.objects,org.w3c.dom,javax.xml.parsers,org.xml.sax.helpers,org.w3c.dom.traversal,org.apache.xml.dtm.ref.sax2dtm,org.apache.xml.dtm.ref,javax.xml.transform.sax,javax.xml.transform.dom,javax.xml.transform.stream,org.apache.xalan.trace,org.apache.xpath.functions,org.apache.xalan.extensions\";version=2.7.2, \
-    org.apache.xalan.xsltc.dom;uses:=\"org.apache.xalan.xsltc.runtime,org.apache.xml.dtm,org.apache.xml.dtm.ref,org.apache.xml.utils,org.apache.xml.serializer,org.xml.sax.ext,org.apache.xalan.xsltc,javax.xml.transform,org.w3c.dom,org.xml.sax,org.apache.xalan.xsltc.util,javax.xml.transform.sax,javax.xml.parsers,javax.xml.transform.stream,org.apache.xalan.xsltc.trax,org.apache.xml.dtm.ref.sax2dtm,javax.xml.transform.dom,org.apache.xml.res\";version=2.7.2, \
-    org.apache.xalan.processor;uses:=\"org.apache.xml.utils,javax.xml.transform,org.apache.xalan.templates,org.w3c.dom,org.xml.sax.helpers,org.xml.sax,org.apache.xalan.res,javax.xml.parsers,javax.xml.transform.dom,javax.xml.transform.stream,javax.xml.transform.sax,org.apache.xpath,org.apache.xalan.extensions,org.apache.xpath.compiler,org.apache.xalan.transformer\";version=2.7.2, \
-    org.apache.xalan.xslt;uses:=\"org.w3c.dom,org.xml.sax,org.apache.xalan.trace,org.apache.xml.utils,org.apache.xalan.res,javax.xml.parsers,javax.xml.transform.dom,org.apache.xalan,javax.xml.transform,javax.xml.transform.stream,org.apache.xalan.transformer,javax.xml.transform.sax,org.xml.sax.helpers\";version=2.7.2, \
-    org.apache.xalan.trace;uses:=\"org.apache.xpath,org.apache.xalan.templates,org.apache.xalan.transformer,org.apache.xpath.objects,org.w3c.dom,org.xml.sax,org.apache.xml.utils,org.apache.xml.dtm,org.apache.xml.dtm.ref,javax.xml.transform\";version=2.7.2, \
-    org.apache.xalan.client;uses:=\"org.apache.xalan.res,javax.xml.transform,javax.xml.transform.stream\";version=2.7.2, \
-    org.apache.xalan.res;uses:=org.apache.xpath.res;version=2.7.2, \
-    org.apache.xalan.xsltc.trax;uses:=\"org.xml.sax.ext,org.xml.sax.helpers,org.w3c.dom,org.xml.sax,org.apache.xalan.xsltc.dom,org.apache.xml.serializer,org.apache.xalan.xsltc.runtime,javax.xml.parsers,javax.xml.transform,org.apache.xalan.xsltc.compiler.util,javax.xml.transform.sax,org.apache.xalan.xsltc.compiler,org.apache.xalan.xsltc,org.apache.xml.utils,javax.xml.transform.dom,org.apache.xml.dtm,org.apache.xalan.xsltc.runtime.output,javax.xml.transform.stream\";version=2.7.2, \
-    org.apache.xalan.xsltc.util;version=2.7.2, \
-    org.apache.xalan.lib;uses:=\"org.apache.xml.dtm.ref,org.w3c.dom,org.apache.xpath.axes,org.apache.xml.dtm,org.apache.xpath,org.apache.xalan.extensions,org.apache.xpath.objects,org.apache.xml.utils,org.apache.xalan.res,javax.xml.transform,javax.xml.parsers,org.xml.sax,org.apache.xalan.xslt,org.w3c.dom.traversal,org.apache.xml.serializer,org.apache.xalan.templates,javax.xml.transform.stream,org.apache.xalan.transformer,javax.xml.transform.sax,org.xml.sax.helpers\";version=2.7.2, \
-    org.apache.xalan.xsltc.runtime;uses:=\"org.apache.xalan.xsltc.runtime.output,org.apache.xml.dtm,org.apache.xml.serializer,org.apache.xalan.xsltc,javax.xml.transform,javax.xml.parsers,org.w3c.dom,org.apache.xalan.xsltc.dom,org.xml.sax,org.apache.xml.utils,org.apache.xml.dtm.ref,javax.xml.transform.dom\";version=2.7.2, \
-    org.apache.xalan.xsltc;uses:=\"org.apache.xalan.xsltc.runtime,org.apache.xml.serializer,org.apache.xml.dtm,org.w3c.dom,org.xml.sax\";version=2.7.2, \
-    org.apache.xalan.xsltc.compiler.util;uses:=\"org.apache.bcel.generic,org.apache.xalan.xsltc.compiler,org.apache.bcel.classfile,org.apache.xml.utils\";version=2.7.2, \
-    org.apache.xml.dtm.ref.sax2dtm;uses:=\"org.apache.xml.utils,org.apache.xml.dtm,org.xml.sax.ext,javax.xml.transform,org.apache.xml.dtm.ref,org.apache.xml.res,org.xml.sax,org.apache.xml.serializer\";version=2.7.2, \
-    org.apache.xml.dtm;uses:=\"org.apache.xml.utils,org.xml.sax.ext,javax.xml.transform,org.w3c.dom,org.xml.sax,org.apache.xml.res\";version=2.7.2, \
-    org.apache.xml.dtm.ref.dom2dtm;uses:=\"org.w3c.dom,org.xml.sax,org.apache.xml.utils,org.apache.xml.dtm,org.xml.sax.ext,javax.xml.transform,org.apache.xml.dtm.ref,org.apache.xml.res,javax.xml.transform.dom\";version=2.7.2, \
-    org.apache.xml.dtm.ref;uses:=\"org.apache.xml.res,org.xml.sax.ext,org.xml.sax,org.apache.xml.utils,org.apache.xml.dtm,org.w3c.dom,javax.xml.transform,org.apache.xml.dtm.ref.sax2dtm,org.apache.xml.dtm.ref.dom2dtm,javax.xml.parsers,javax.xml.transform.dom,javax.xml.transform.stream,javax.xml.transform.sax,org.xml.sax.helpers,org.w3c.dom.traversal,org.apache.xpath,org.apache.xerces.parsers,org.apache.xml.serialize\";version=2.7.2, \
-    org.apache.xml.res;version=2.7.2, \
-    org.apache.xml.utils;uses:=\"org.w3c.dom,org.xml.sax,javax.xml.transform,javax.xml.parsers,org.xml.sax.ext,org.apache.xml.res,org.apache.xml.dtm.ref,org.xml.sax.helpers,javax.xml.transform.sax,org.apache.xml.dtm.ref.dom2dtm\";version=2.7.2, \
-    org.apache.xml.utils.res;version=2.7.2, \
-    org.apache.xpath.axes;uses:=\"org.apache.xml.dtm,javax.xml.transform,org.apache.xpath.compiler,org.apache.xpath.patterns,org.apache.xpath,org.apache.xalan.res,org.apache.xml.utils,org.w3c.dom.traversal,org.w3c.dom,org.apache.xpath.objects,org.apache.xpath.operations,org.apache.xpath.functions,org.xml.sax\";version=2.7.2, \
-    org.apache.xpath.res;uses:=org.apache.xml.res;version=2.7.2, \
-    org.apache.xpath.functions;uses:=\"org.apache.xpath,javax.xml.transform,org.apache.xpath.objects,org.apache.xalan.res,org.apache.xml.dtm,org.apache.xpath.patterns,org.apache.xpath.axes,org.apache.xml.utils,org.apache.xalan.templates,org.apache.xalan.transformer,org.apache.xpath.res,org.apache.xpath.compiler,org.xml.sax\";version=2.7.2, \
-    org.apache.xpath.objects;uses:=\"org.apache.xml.utils,org.apache.xml.dtm,org.apache.xpath,javax.xml.transform,org.apache.xpath.axes,org.apache.xml.dtm.ref,org.w3c.dom.traversal,org.w3c.dom,org.xml.sax,org.apache.xalan.res,org.xml.sax.ext\";version=2.7.2, \
-    org.apache.xpath;uses:=\"org.apache.xml.utils,org.apache.xpath.objects,javax.xml.transform,org.w3c.dom.traversal,org.w3c.dom,org.apache.xml.dtm,org.apache.xalan.res,org.xml.sax,org.apache.xpath.functions,org.apache.xpath.axes,javax.xml.transform.stream,javax.xml.parsers,javax.xml.transform.sax,org.xml.sax.helpers,org.apache.xalan.templates,org.apache.xpath.compiler,org.apache.xml.dtm.ref,org.apache.xalan.extensions,org.apache.xml.dtm.ref.sax2dtm,org.apache.xpath.patterns,org.apache.xpath.operations\";version=2.7.2, \
-    org.apache.xpath.operations;uses:=\"org.apache.xpath,javax.xml.transform,org.apache.xpath.objects,org.apache.xml.utils,org.apache.xpath.axes,org.apache.xml.dtm,org.apache.xalan.res,org.apache.xalan.templates,org.w3c.dom\";version=2.7.2, \
-    org.apache.xpath.jaxp;uses:=\"org.apache.xml.utils,javax.xml.xpath,org.apache.xpath,org.apache.xalan.res,javax.xml.transform,org.apache.xpath.functions,org.apache.xpath.objects,org.w3c.dom,javax.xml.namespace,javax.xml.parsers,org.w3c.dom.traversal,org.xml.sax\";version=2.7.2, \
-    org.apache.xpath.domapi;uses:=\"org.apache.xml.utils,org.apache.xpath.res,org.w3c.dom,org.w3c.dom.xpath,org.apache.xpath,javax.xml.transform,org.apache.xpath.objects,org.w3c.dom.events,org.w3c.dom.traversal\";version=2.7.2, \
-    org.apache.xpath.patterns;uses:=\"org.apache.xpath.axes,org.apache.xml.dtm,org.apache.xpath,javax.xml.transform,org.apache.xpath.objects\";version=2.7.2, \
-    org.apache.xpath.compiler;uses:=\"org.apache.xml.utils,org.apache.xpath.patterns,org.apache.xpath.axes,org.apache.xml.dtm,org.apache.xpath,org.apache.xalan.res,javax.xml.transform,org.apache.xpath.operations,org.apache.xpath.functions,org.apache.xpath.objects,org.apache.xalan.templates,org.apache.xpath.domapi\";version=2.7.2, \
-    org.apache.html.dom;uses:=\"org.apache.xerces.dom,org.w3c.dom,org.xml.sax\";version=2.11.0, \
-    org.apache.wml;uses:=org.w3c.dom;version=2.11.0, \
-    org.apache.wml.dom;uses:=\"org.apache.wml,org.apache.xerces.dom,org.w3c.dom\";version=2.11.0, \
-    org.apache.xerces.dom;uses:=\"org.apache.xerces.dom3.as,org.apache.xerces.impl,org.apache.xerces.impl.dv,org.apache.xerces.impl.validation,org.apache.xerces.impl.xs,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.parser,org.apache.xerces.xs,org.w3c.dom,org.w3c.dom.events,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.traversal\";version=2.11.0, \
-    org.apache.xerces.dom.events;uses:=\"org.w3c.dom,org.w3c.dom.events,org.w3c.dom.views\";version=2.11.0, \
-    org.apache.xerces.dom3.as;uses:=\"org.w3c.dom,org.w3c.dom.ls\";version=2.11.0, \
-    org.apache.xerces.impl;uses:=\"org.apache.xerces.impl.dtd,org.apache.xerces.impl.validation,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.grammars,org.apache.xerces.xni.parser,org.xml.sax\";version=2.11.0, \
-    org.apache.xerces.impl.dtd;uses:=\"org.apache.xerces.impl,org.apache.xerces.impl.dtd.models,org.apache.xerces.impl.dv,org.apache.xerces.impl.validation,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.grammars,org.apache.xerces.xni.parser\";version=2.11.0, \
-    org.apache.xerces.impl.dtd.models;uses:=org.apache.xerces.xni;version=2.11.0, \
-    org.apache.xerces.impl.dv;uses:=\"org.apache.xerces.impl.xs.util,org.apache.xerces.util,org.apache.xerces.xs\";version=2.11.0, \
-    org.apache.xerces.impl.dv.dtd;uses:=org.apache.xerces.impl.dv;version=2.11.0, \
-    org.apache.xerces.impl.dv.util;uses:=\"org.apache.xerces.xs,org.apache.xerces.xs.datatypes\";version=2.11.0, \
-    org.apache.xerces.impl.dv.xs;uses:=\"javax.xml.datatype,org.apache.xerces.impl.dv,org.apache.xerces.impl.xs,org.apache.xerces.impl.xs.util,org.apache.xerces.util,org.apache.xerces.xs,org.apache.xerces.xs.datatypes,org.w3c.dom\";version=2.11.0, \
-    org.apache.xerces.impl.io;uses:=org.apache.xerces.util;version=2.11.0, \
-    org.apache.xerces.impl.msg;uses:=org.apache.xerces.util;version=2.11.0, \
-    org.apache.xerces.impl.validation;uses:=\"org.apache.xerces.impl.dv,org.apache.xerces.util,org.apache.xerces.xni\";version=2.11.0, \
-    org.apache.xerces.impl.xpath;uses:=\"org.apache.xerces.util,org.apache.xerces.xni\";version=2.11.0, \
-    org.apache.xerces.impl.xpath.regex;version=2.11.0, \
-    org.apache.xerces.impl.xs;uses:=\"org.apache.xerces.dom,org.apache.xerces.impl,org.apache.xerces.impl.dv,org.apache.xerces.impl.dv.xs,org.apache.xerces.impl.validation,org.apache.xerces.impl.xs.identity,org.apache.xerces.impl.xs.models,org.apache.xerces.impl.xs.util,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.grammars,org.apache.xerces.xni.parser,org.apache.xerces.xs,org.apache.xerces.xs.datatypes,org.w3c.dom,org.w3c.dom.ls\";version=2.11.0, \
-    org.apache.xerces.impl.xs.identity;uses:=\"org.apache.xerces.impl.xpath,org.apache.xerces.impl.xs,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xs\";version=2.11.0, \
-    org.apache.xerces.impl.xs.models;uses:=\"org.apache.xerces.impl.dtd.models,org.apache.xerces.impl.xs,org.apache.xerces.xni,org.apache.xerces.xni.parser\";version=2.11.0, \
-    org.apache.xerces.impl.xs.opti;uses:=\"org.apache.xerces.impl,org.apache.xerces.impl.dv,org.apache.xerces.impl.validation,org.apache.xerces.parsers,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.grammars,org.apache.xerces.xni.parser,org.w3c.dom\";version=2.11.0, \
-    org.apache.xerces.impl.xs.traversers;uses:=\"org.apache.xerces.impl.dv,org.apache.xerces.impl.xs,org.apache.xerces.impl.xs.util,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.parser,org.w3c.dom\";version=2.11.0, \
-    org.apache.xerces.impl.xs.util;uses:=\"org.apache.xerces.impl.xs,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.parser,org.apache.xerces.xs,org.apache.xerces.xs.datatypes,org.w3c.dom.ls\";version=2.11.0, \
-    org.apache.xerces.jaxp;uses:=\"javax.xml.parsers,javax.xml.validation,org.apache.xerces.parsers,org.apache.xerces.xs,org.w3c.dom,org.xml.sax,org.xml.sax.helpers\";version=2.11.0, \
-    org.apache.xerces.jaxp.datatype;uses:=javax.xml.datatype;version=2.11.0, \
-    org.apache.xerces.jaxp.validation;uses:=\"javax.xml.transform,javax.xml.validation,org.apache.xerces.xni.grammars,org.w3c.dom.ls,org.xml.sax\";version=2.11.0, \
-    org.apache.xerces.parsers;uses:=\"org.apache.xerces.dom,org.apache.xerces.dom3.as,org.apache.xerces.impl,org.apache.xerces.impl.dtd,org.apache.xerces.impl.dv,org.apache.xerces.impl.validation,org.apache.xerces.impl.xs,org.apache.xerces.util,org.apache.xerces.xinclude,org.apache.xerces.xni,org.apache.xerces.xni.grammars,org.apache.xerces.xni.parser,org.apache.xerces.xs,org.w3c.dom,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext\";version=2.11.0, \
-    org.apache.xerces.stax;uses:=\"javax.xml.namespace,javax.xml.stream,javax.xml.stream.events\";version=2.11.0, \
-    org.apache.xerces.stax.events;uses:=\"javax.xml.namespace,javax.xml.stream,javax.xml.stream.events\";version=2.11.0, \
-    org.apache.xerces.util;uses:=\"javax.xml.namespace,javax.xml.stream,org.apache.xerces.dom,org.apache.xerces.impl,org.apache.xerces.xni,org.apache.xerces.xni.grammars,org.apache.xerces.xni.parser,org.w3c.dom,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext\";version=2.11.0, \
-    org.apache.xerces.xinclude;uses:=\"org.apache.xerces.impl,org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.parser,org.apache.xerces.xpointer\";version=2.11.0, \
-    org.apache.xerces.xni;uses:=org.apache.xerces.xni.parser;version=2.11.0, \
-    org.apache.xerces.xni.grammars;uses:=\"org.apache.xerces.xni,org.apache.xerces.xni.parser,org.apache.xerces.xs\";version=2.11.0, \
-    org.apache.xerces.xni.parser;uses:=org.apache.xerces.xni;version=2.11.0, \
-    org.apache.xerces.xpointer;uses:=\"org.apache.xerces.impl,org.apache.xerces.util,org.apache.xerces.xinclude,org.apache.xerces.xni,org.apache.xerces.xni.parser\";version=2.11.0, \
-    org.apache.xerces.xs;uses:=\"org.apache.xerces.xs.datatypes,org.w3c.dom,org.w3c.dom.ls\";version=2.11.0, \
-    org.apache.xerces.xs.datatypes;uses:=\"javax.xml.datatype,javax.xml.namespace,org.apache.xerces.xni,org.apache.xerces.xs\";version=2.11.0, \
-    org.apache.xml.serialize;uses:=\"org.apache.xerces.dom,org.apache.xerces.util,org.w3c.dom,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext\";version=2.11.0, \
-    org.apache.karaf.jaas.boot;uses:=\"javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework\";version=4.0.4, \
-    org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.0.4, \
-    org.apache.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.0.4, \
-    org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.0.4
-
-org.osgi.framework.system.capabilities= \
- ${eecap-${java.specification.version}}, \
- osgi.service;effective:=active;objectClass=org.osgi.service.packageadmin.PackageAdmin, \
- osgi.service;effective:=active;objectClass=org.osgi.service.resolver.Resolver, \
- osgi.service;effective:=active;objectClass=org.osgi.service.startlevel.StartLevel, \
- osgi.service;effective:=active;objectClass=org.osgi.service.url.URLHandlers
-
-eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8"
-eecap-1.7= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7"
-eecap-1.6= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6"
-eecap-1.5= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5"
-eecap-1.4= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4"
-eecap-1.3= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3"
-eecap-1.2= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2"
-
-#
-# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
-#
-org.osgi.framework.bootdelegation = \
-    com.sun.*, \
-    javax.transaction, \
-    javax.transaction.*, \
-    javax.xml.crypto, \
-    javax.xml.crypto.*, \
-    jdk.nashorn.*, \
-    sun.*, \
-    org.apache.html.dom, \
-    org.apache.wml, \
-    org.apache.wml.dom, \
-    org.apache.xerces.dom, \
-    org.apache.xerces.dom.events, \
-    org.apache.xerces.dom3.as, \
-    org.apache.xerces.impl, \
-    org.apache.xerces.impl.dtd, \
-    org.apache.xerces.impl.dtd.models, \
-    org.apache.xerces.impl.dv, \
-    org.apache.xerces.impl.dv.dtd, \
-    org.apache.xerces.impl.dv.util, \
-    org.apache.xerces.impl.dv.xs, \
-    org.apache.xerces.impl.io, \
-    org.apache.xerces.impl.msg, \
-    org.apache.xerces.impl.validation, \
-    org.apache.xerces.impl.xpath, \
-    org.apache.xerces.impl.xpath.regex, \
-    org.apache.xerces.impl.xs, \
-    org.apache.xerces.impl.xs.identity, \
-    org.apache.xerces.impl.xs.models, \
-    org.apache.xerces.impl.xs.opti, \
-    org.apache.xerces.impl.xs.traversers, \
-    org.apache.xerces.impl.xs.util, \
-    org.apache.xerces.jaxp, \
-    org.apache.xerces.jaxp.datatype, \
-    org.apache.xerces.jaxp.validation, \
-    org.apache.xerces.parsers, \
-    org.apache.xerces.stax, \
-    org.apache.xerces.stax.events, \
-    org.apache.xerces.util, \
-    org.apache.xerces.xinclude, \
-    org.apache.xerces.xni, \
-    org.apache.xerces.xni.grammars, \
-    org.apache.xerces.xni.parser, \
-    org.apache.xerces.xpointer, \
-    org.apache.xerces.xs, \
-    org.apache.xerces.xs.datatypes, \
-    org.apache.xml.serialize, \
-    org.apache.karaf.jaas.boot, \
-    org.apache.karaf.jaas.boot.principal
-
-# jVisualVM support
-# in order to use Karaf with jvisualvm, the org.osgi.framework.bootdelegation property has to contain the org.netbeans.lib.profiler.server package
-# and, so, it should look like:
-#
-# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,org.netbeans.lib.profiler.server
-#
-# YourKit support
-# in order to use Karaf with YourKit, the org.osgi.framework.bootdelegation property has to contain the com.yourkit.* packages
-# and, so, it should look like:
-#
-# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,com.yourkit.*
-#
-
-#
-# OSGi Execution Environment
-#
-org.osgi.framework.executionenvironment=J2SE-1.7,JavaSE-1.7,J2SE-1.6,JavaSE-1.6,J2SE-1.5,JavaSE-1.5,J2SE-1.4,JavaSE-1.4,J2SE-1.3,JavaSE-1.3,J2SE-1.2,,JavaSE-1.2,CDC-1.1/Foundation-1.1,CDC-1.0/Foundation-1.0,J2ME,OSGi/Minimum-1.1,OSGi/Minimum-1.0
-
-#
-# Set the parent classloader for the bundle to the classloader that loads the Framework (i.e. everything in lib/*.jar)
-#
-org.osgi.framework.bundle.parent=framework
-
-#
-# Definition of the default bundle start level
-#
-org.osgi.framework.startlevel.beginning=100
-karaf.startlevel.bundle=80
-
-#
-# The location of the Karaf shutdown port file used to stop instance
-#
-karaf.shutdown.port.file=${karaf.data}/port
-
-#
-# The location of the Karaf pid port file
-#
-karaf.pid.file=${karaf.base}/karaf.pid
-
-#
-# Configuration FileMonitor properties
-#
-felix.fileinstall.enableConfigSave = true
-felix.fileinstall.dir    = ${karaf.etc}
-felix.fileinstall.filter = .*\\.(cfg|config)
-felix.fileinstall.poll   = 1000
-felix.fileinstall.noInitialDelay = true
-felix.fileinstall.log.level = 3
-felix.fileinstall.log.default = jul
-
-#
-# Delay for writing the framework state to disk in equinox
-# must be  >= 1000 and <= 1800000
-#
-eclipse.stateSaveDelayInterval = 1000
-
-#
-# OBR Repository list
-# This property will be modified by the obr:addUrl and obr:removeUrl commands. 
-#
-obr.repository.url = 
-
-#
-# Start blueprint bundles synchronously when possible
-#
-org.apache.aries.blueprint.synchronous=true
-
-#
-# Do not weave all any classes by default
-#
-org.apache.aries.proxy.weaving.enabled=
-
-#
-# mvn url handler requires config instance configuration
-#
-org.ops4j.pax.url.mvn.requireConfigAdminConfig=true
-
-#
-# Don't delay the console startup. Set to true if you want the console to start after all other bundles
-#
-karaf.delay.console=false
diff --git a/demos/web/src/main/webapp/WEB-INF/karaf/etc/startup.properties b/demos/web/src/main/webapp/WEB-INF/karaf/etc/startup.properties
deleted file mode 100644
index 9d41b5ffb1..0000000000
--- a/demos/web/src/main/webapp/WEB-INF/karaf/etc/startup.properties
+++ /dev/null
@@ -1,30 +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.
-#
-################################################################################
-
-# Bundles to be started on startup, with startlevel
-mvn\:org.apache.sshd/sshd-core/0.14.0 = 20
-mvn\:org.apache.felix/org.apache.felix.metatype/1.1.2 = 5
-mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.0.4-SNAPSHOT = 5
-mvn\:org.ops4j.pax.url/pax-url-aether/2.4.4 = 5
-mvn\:org.ops4j.pax.logging/pax-logging-api/1.8.4 = 8
-mvn\:org.ops4j.pax.logging/pax-logging-log4j2/1.8.4 = 8
-mvn\:org.apache.felix/org.apache.felix.configadmin/1.8.8 = 10
-mvn\:org.apache.felix/org.apache.felix.fileinstall/3.5.0 = 11
-mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.0.4-SNAPSHOT = 15
-mvn\:org.apache.felix/org.apache.felix.http.bridge/3.0.0 = 15
diff --git a/demos/web/src/main/webapp/WEB-INF/karaf/system/org/apache/felix/org.apache.felix.http.bridge/3.0.0/org.apache.felix.http.bridge-3.0.0.jar b/demos/web/src/main/webapp/WEB-INF/karaf/system/org/apache/felix/org.apache.felix.http.bridge/3.0.0/org.apache.felix.http.bridge-3.0.0.jar
deleted file mode 100644
index db8038c652..0000000000
Binary files a/demos/web/src/main/webapp/WEB-INF/karaf/system/org/apache/felix/org.apache.felix.http.bridge/3.0.0/org.apache.felix.http.bridge-3.0.0.jar and /dev/null differ
diff --git a/demos/web/src/main/webapp/WEB-INF/web.xml b/demos/web/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index f3b8b1d498..0000000000
--- a/demos/web/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,51 +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.
--->
-
-<web-app version="2.4"
-         xmlns="http://java.sun.com/xml/ns/j2ee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-                             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
-  <description>Karaf Embedded Example</description>
-  <display-name>Karaf Embedded Example</display-name>
-
-  <listener>
-    <listener-class>org.apache.karaf.web.WebAppListener</listener-class>
-  </listener>
-
-  <listener>
-    <listener-class>org.apache.felix.http.proxy.ProxyListener</listener-class>
-  </listener>
-
-  <servlet>
-    <servlet-name>proxy</servlet-name>
-    <servlet-class>org.apache.felix.http.proxy.ProxyServlet</servlet-class>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
-
-  <servlet-mapping>
-    <servlet-name>proxy</servlet-name>
-    <url-pattern>/*</url-pattern>
-  </servlet-mapping>
-
-  <welcome-file-list>
-    <welcome-file>index.jsp</welcome-file>
-  </welcome-file-list>
-		
-</web-app>
diff --git a/demos/deployer/kar/src/main/feature/feature.xml b/examples/README.md
similarity index 71%
rename from demos/deployer/kar/src/main/feature/feature.xml
rename to examples/README.md
index cdcd72f472..4d5647311c 100644
--- a/demos/deployer/kar/src/main/feature/feature.xml
+++ b/examples/README.md
@@ -1,26 +1,23 @@
-<?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.
--->
-<features name="demos">
-
-    <feature name="my-kar" version="1.0">
-        <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>
-    </feature>
-
-</features>
+<!--
+    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.
+-->
+# Apache Karaf Examples
+
+The Apache Karaf Examples provide different starting point showing how to implement concrete use cases leveraging Apache Karaf capabilities.
+
+Take a look on the README.md file in each example to see the goal and how to run the example.
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/README.md b/examples/karaf-blueprint-example/README.md
new file mode 100644
index 0000000000..b28a404276
--- /dev/null
+++ b/examples/karaf-blueprint-example/README.md
@@ -0,0 +1,65 @@
+<!--
+    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.
+-->
+# Apache Karaf Blueprint Example
+
+## Abstract
+
+Blueprint is a convenient way of using services. You can describe your beans and services using a XML descriptor.
+You can write this XML by hand or use annotation and let the `blueprint-maven-plugin` generates the XML for you.
+
+## Artifacts
+
+* `karaf-blueprint-example-common` provides the `BookingService` interface and `Booking` POJO.
+* `karaf-blueprint-example-provider` implements and exposes a `BookingService` using a Blueprint XML file.
+* `karaf-blueprint-example-client` uses `OSGI-INF/blueprint/client.xml` Blueprint XML to get a service and start a thread.
+* `karaf-blueprint-example-features` contains a Karaf features repository used for the deployment.
+
+## Build 
+
+Simply use:
+
+```
+mvn clean install
+```
+
+## Feature and Deployment
+
+On a running Karaf instance, you register the blueprint example features repository with:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-blueprint-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then you can install the `karaf-blueprint-example-provider` feature:
+
+```
+karaf@root()> feature:install karaf-blueprint-example-provider
+```
+
+Now, you can install the `karaf-blueprint-example-client` feature:
+
+```
+karaf@root()> feature:install karaf-blueprint-example-client
+```
+
+When you install the client feature, you should see on the console:
+
+```
+karaf@root()> 1794197511025182174 | John Doo | AF3030
+```
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-client/pom.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-client/pom.xml
new file mode 100644
index 0000000000..f9016f2e48
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-client/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-blueprint-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-blueprint-example-client</artifactId>
+    <name>Apache Karaf :: Examples :: Blueprint :: Client</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-blueprint-example-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>org.apache.karaf.examples.blueprint.common</Import-Package>
+                        <Private-Package>org.apache.karaf.examples.blueprint.client</Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/ClientService.java b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/ClientService.java
new file mode 100644
index 0000000000..a5d645221e
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/ClientService.java
@@ -0,0 +1,29 @@
+/*
+ *  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.karaf.examples.blueprint.client;
+
+import org.apache.karaf.examples.blueprint.common.Booking;
+
+import java.util.List;
+
+public interface ClientService {
+
+    List<Booking> bookings();
+
+    void addBooking(Booking booking);
+
+}
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/ClientServiceImpl.java b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/ClientServiceImpl.java
new file mode 100644
index 0000000000..2b7d92486e
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/ClientServiceImpl.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.karaf.examples.blueprint.client;
+
+import org.apache.karaf.examples.blueprint.common.Booking;
+import org.apache.karaf.examples.blueprint.common.BookingService;
+
+import java.util.List;
+
+/**
+ * Just an indirection service basically for the itest.
+ */
+public class ClientServiceImpl implements ClientService {
+
+    private BookingService bookingService;
+
+    @Override
+    public List<Booking> bookings() {
+        return bookingService.list();
+    }
+
+    @Override
+    public void addBooking(Booking booking) {
+        bookingService.add(booking);
+    }
+
+    public BookingService getBookingService() {
+        return bookingService;
+    }
+
+    public void setBookingService(BookingService bookingService) {
+        this.bookingService = bookingService;
+    }
+}
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/Display.java b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/Display.java
new file mode 100644
index 0000000000..3fdfc7face
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/java/org/apache/karaf/examples/blueprint/client/Display.java
@@ -0,0 +1,96 @@
+/*
+ *  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.karaf.examples.blueprint.client;
+
+import org.apache.karaf.examples.blueprint.common.Booking;
+
+/**
+ * Simple class getting the booking service (thanks to Blueprint), adding a random booking and displaying periodically.
+ */
+public class Display {
+
+    private ClientService clientService;
+
+    private BookingDisplayThread thread;
+    private boolean bookingThreadStarted = false;
+
+    /**
+     * This setter is used by Blueprint to inject the client service.
+     */
+    public void setClientService(ClientService clientService) {
+        this.clientService = clientService;
+    }
+
+    /**
+     * Init method used to start the thread.
+     */
+    public void init() {
+        BookingDisplayThread thread = new BookingDisplayThread(clientService);
+        thread.start();
+    }
+
+    /**
+     * Destroy method used to stop the thread.
+     */
+    public void destroy() {
+        thread.terminate();
+    }
+
+    /**
+     * Very simple thread adding random booking and displaying the bookings on System.out every 5s.
+     */
+    private class BookingDisplayThread extends Thread {
+
+        private ClientService clientService;
+        private volatile boolean running = true;
+
+        public BookingDisplayThread(ClientService clientService) {
+            this.clientService = clientService;
+        }
+
+        @Override
+        public void run() {
+            while (running) {
+                try {
+
+                    // TODO test
+                    Booking booking = new Booking("John Doo", "AF3030");
+                    clientService.addBooking(booking);
+
+                    System.out.println(displayBookings());
+                    Thread.sleep(5000);
+                } catch (Exception e) {
+                    // nothing to do
+                }
+            }
+        }
+
+        private String displayBookings() {
+            StringBuilder builder = new StringBuilder();
+            for (Booking booking : clientService.bookings()) {
+                builder.append(booking.getId()).append(" | ").append(booking.getCustomer()).append(" | ").append(booking.getFlight()).append("\n");
+            }
+            return builder.toString();
+        }
+
+        public void terminate() {
+            running = false;
+        }
+
+    }
+
+}
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/resources/OSGI-INF/blueprint/client.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/resources/OSGI-INF/blueprint/client.xml
new file mode 100644
index 0000000000..c956902d8d
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-client/src/main/resources/OSGI-INF/blueprint/client.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.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.
+    -->
+
+    <reference id="bookingService" interface="org.apache.karaf.examples.blueprint.common.BookingService"/>
+
+    <bean id="clientService" class="org.apache.karaf.examples.blueprint.client.ClientServiceImpl">
+        <property name="bookingService" ref="bookingService"/>
+    </bean>
+
+    <service interface="org.apache.karaf.examples.blueprint.client.ClientService" ref="clientService"/>
+
+    <bean id="displayClient" class="org.apache.karaf.examples.blueprint.client.Display" init-method="init" destroy-method="destroy">
+        <property name="clientService" ref="clientService"/>
+    </bean>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-common/pom.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-common/pom.xml
new file mode 100644
index 0000000000..b2f182ead0
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-common/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-blueprint-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-blueprint-example-common</artifactId>
+    <name>Apache Karaf :: Examples :: Blueprint :: Common</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.blueprint.common</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/Booking.java b/examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/Booking.java
new file mode 100644
index 0000000000..884161ac06
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/Booking.java
@@ -0,0 +1,61 @@
+/*
+ *  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.karaf.examples.blueprint.common;
+
+import java.util.Random;
+
+/**
+ * A simple POJO describing a booking.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Booking(String customer, String flight) throws Exception {
+        this.id = new Random().nextLong();
+        this.customer = customer;
+        this.flight = flight;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+
+}
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/BookingService.java b/examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/BookingService.java
new file mode 100644
index 0000000000..ee4d5008b2
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/BookingService.java
@@ -0,0 +1,32 @@
+/*
+ *  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.karaf.examples.blueprint.common;
+
+import java.util.List;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    List<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+}
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-features/pom.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-features/pom.xml
new file mode 100644
index 0000000000..39a33fe4b2
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-blueprint-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-blueprint-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: Blueprint :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-features/src/main/feature/feature.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..3ffa2b48d7
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-features/src/main/feature/feature.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<features name="karaf-blueprint-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
+
+    <repository>mvn:org.apache.karaf.features/standard/${project.version}/xml/features</repository>
+
+    <feature name="karaf-blueprint-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-blueprint-example-common/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-blueprint-example-provider" version="${project.version}">
+        <feature>aries-blueprint</feature>
+        <feature>karaf-blueprint-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-blueprint-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-blueprint-example-client" version="${project.version}">
+        <feature>aries-blueprint</feature>
+        <feature>karaf-blueprint-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-blueprint-example-client/${project.version}</bundle>
+    </feature>
+
+</features>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-provider/pom.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-provider/pom.xml
new file mode 100644
index 0000000000..82b807c47c
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-provider/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-blueprint-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-blueprint-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: Blueprint :: Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-blueprint-example-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>blueprint-maven-plugin-annotation</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>org.apache.karaf.examples.blueprint.provider.internal</Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-provider/src/main/java/org/apache/karaf/examples/blueprint/provider/internal/BookingServiceImpl.java b/examples/karaf-blueprint-example/karaf-blueprint-example-provider/src/main/java/org/apache/karaf/examples/blueprint/provider/internal/BookingServiceImpl.java
new file mode 100644
index 0000000000..76492f47fe
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-provider/src/main/java/org/apache/karaf/examples/blueprint/provider/internal/BookingServiceImpl.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.karaf.examples.blueprint.provider.internal;
+
+import org.apache.karaf.examples.blueprint.common.Booking;
+import org.apache.karaf.examples.blueprint.common.BookingService;
+
+import java.util.*;
+
+/**
+ * Very simple implementation of a booking service.
+ */
+public class BookingServiceImpl implements BookingService {
+
+    private Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    public List<Booking> list() {
+        return new LinkedList<>(bookings.values());
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return bookings.get(id);
+    }
+
+    @Override
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+}
diff --git a/examples/karaf-blueprint-example/karaf-blueprint-example-provider/src/main/resources/OSGI-INF/blueprint/provider.xml b/examples/karaf-blueprint-example/karaf-blueprint-example-provider/src/main/resources/OSGI-INF/blueprint/provider.xml
new file mode 100644
index 0000000000..9ad40ac1d8
--- /dev/null
+++ b/examples/karaf-blueprint-example/karaf-blueprint-example-provider/src/main/resources/OSGI-INF/blueprint/provider.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.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.
+    -->
+
+    <bean id="bookingService" class="org.apache.karaf.examples.blueprint.provider.internal.BookingServiceImpl"/>
+
+    <service ref="bookingService" interface="org.apache.karaf.examples.blueprint.common.BookingService"/>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-blueprint-example/pom.xml b/examples/karaf-blueprint-example/pom.xml
new file mode 100644
index 0000000000..29224561af
--- /dev/null
+++ b/examples/karaf-blueprint-example/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-blueprint-example</artifactId>
+    <name>Apache Karaf :: Examples :: Blueprint</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-blueprint-example-common</module>
+        <module>karaf-blueprint-example-provider</module>
+        <module>karaf-blueprint-example-client</module>
+        <!-- <module>karaf-blueprint-starter-annotation</module> -->
+        <module>karaf-blueprint-example-features</module>
+    </modules>
+
+</project>
diff --git a/examples/karaf-branding-example/README.md b/examples/karaf-branding-example/README.md
new file mode 100644
index 0000000000..778274b695
--- /dev/null
+++ b/examples/karaf-branding-example/README.md
@@ -0,0 +1,81 @@
+<!--
+    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.
+-->
+# Apache Karaf Branding Example
+
+## Abstract
+
+You can change the look'n feel (branding) of the Karaf shell console to provide your own Karaf distribution.
+It's also possible to brand the Karaf SSH shell.
+
+To do so, you have two solutions:
+
+* Provide a `branding.properties` file in the Karaf `etc` folder.
+* Provide a bundle providing the branding
+
+## Using `etc/branding.properties` file
+
+It's probably the easiest way to customize the Karaf shell console.
+
+The `branding.properties` basically contains the "welcome message" or "message of the day" (displayed when Karaf starts).
+
+
+_NB: It's also possible to configure the shell prompt in the `prompt` property in `etc/shell.init.script`._
+
+For instance, the following `branding.properties`:
+
+```
+welcome = \
+\n\
+\u001B[1m  My Lovely Apache Karaf Branding\u001B[0m (x.x.x)\n\
+\n\
+Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\n\
+   and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\n
+```
+
+Note here the using of the ASCII code (`\u001B[1m`) allowing you to use bold, italic, color, ... text in the shell console.
+
+The only drawback of this approach is the `branding.properties` is "visible" and can be changed by an end-user.
+
+The second solution using a bundle allows you to "hide" the `branding.properties` file.
+
+## Using branding bundle
+
+This example also provides a branding bundle wrapping the `branding.properties` file.
+
+A branding bundle has to wrap a `org.apache.karaf.branding` package containing the `branding.properties` file.
+
+### Artifacts
+
+The `karaf-branding-example` bundle is the one providing our custom branding properties file.
+
+### Build
+
+To build the `karaf-branding-example` bundle, you just have to do:
+
+```
+mvn clean install
+```
+
+### Deployment
+
+The `karaf-branding-example` bundle has to be part of the startup bundles. You have two ways to register your custom
+branding bundle:
+
+1. You can define the `karaf-branding-example` bundle URL (`mvn:org.apache.karaf.examples/karaf-branding-example/4.2.1-SNAPSHOT`) in the `etc/startup.properties` file.
+2. You can create your own custom profile (see profile example for detail), defining `karaf-branding-example` bundle URL (`bundle.mvn\:org.apache.karaf.examples/karaf-branding-example/4.2.1-SNAPSHOT = mvn:org.apache.karaf.examples/karaf-branding-starter/4.2.1-SNAPSHOT`) in the `etc/profile.cfg` file. 
\ No newline at end of file
diff --git a/demos/branding/pom.xml b/examples/karaf-branding-example/pom.xml
similarity index 64%
rename from demos/branding/pom.xml
rename to examples/karaf-branding-example/pom.xml
index e0af083632..e02592f748 100644
--- a/demos/branding/pom.xml
+++ b/examples/karaf-branding-example/pom.xml
@@ -2,6 +2,7 @@
 <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">
 
     <!--
+
         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.
@@ -9,7 +10,7 @@
         (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
+           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,
@@ -21,44 +22,30 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>demos</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos</groupId>
-    <artifactId>org.apache.karaf.demos.branding.shell</artifactId>
-    <version>4.2.1-SNAPSHOT</version>
+    <artifactId>karaf-branding-example</artifactId>
+    <name>Apache Karaf :: Examples :: Branding</name>
     <packaging>bundle</packaging>
-    <name>Apache Karaf :: Demos :: Branding :: Shell</name>
 
     <build>
-        <resources>
-            <resource>
-                <directory>${project.basedir}/src/main/resources</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>org.apache.karaf.branding</Export-Package>
                         <Import-Package>*</Import-Package>
                         <Private-Package>!*</Private-Package>
-                        <Export-Package>
-                            org.apache.karaf.branding
-                        </Export-Package>
-                    </instructions> 
+                    </instructions>
                 </configuration>
             </plugin>
         </plugins>
     </build>
 
-</project> 
+</project>
diff --git a/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties b/examples/karaf-branding-example/src/main/resources/org/apache/karaf/branding/branding.properties
similarity index 92%
rename from demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties
rename to examples/karaf-branding-example/src/main/resources/org/apache/karaf/branding/branding.properties
index c49a09b174..b050f0daa9 100644
--- a/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties
+++ b/examples/karaf-branding-example/src/main/resources/org/apache/karaf/branding/branding.properties
@@ -19,7 +19,7 @@
 
 welcome = \
 \n\
-\u001B[1m  Apache Karaf Re-Branding Demo\u001B[0m (${project.version})\n\
+\u001B[1m  Custom Karaf Branding Example\u001B[0m (${project.version})\n\
 \n\
 Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\n\
    and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\n
diff --git a/examples/karaf-bundle-example/README.md b/examples/karaf-bundle-example/README.md
new file mode 100644
index 0000000000..bbd58c7efc
--- /dev/null
+++ b/examples/karaf-bundle-example/README.md
@@ -0,0 +1,66 @@
+<!--
+    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.
+-->
+# Apache Karaf Bundle Example
+
+## Abstract
+
+One of the kind of applications you can deploy in Apache Karaf is obviously OSGi bundle.
+
+The bundle is the core deployment unit when using OSGi. It's basically a regular jar file containing some additional headers in the MANIFEST used by the OSGi framework, and so Karaf.
+
+## Artifacts
+
+* `karaf-bundle-example-common` provides the `BookingService` interface and `Booking` POJO.
+* `karaf-bundle-example-provider` implements and exposes a `BookingService` in the OSGi service registry.
+* `karaf-bundle-example-client` exposes a new `ClientService` using the `BookingService`. This service is used to periodically manipulate the `BookingService`.
+* `karaf-bundle-example-features` contains a Karaf features repository used for the deployment.
+
+## Build 
+
+Simply use:
+
+```
+mvn clean install
+```
+
+## Feature and Deployment
+
+On a running Karaf instance, you register the bundle example features repository with:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-bundle-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then you can install the `karaf-bundle-example-provider` feature:
+
+```
+karaf@root()> feature:install karaf-bundle-example-provider
+```
+
+Now, you can install the `karaf-bundle-example-client` feature:
+
+```
+karaf@root()> feature:install karaf-bundle-example-client
+```
+
+When you install the client feature, you should see on the console:
+
+```
+karaf@root()> 1794197511025182174 | John Doo | AF3030
+```
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-client/pom.xml b/examples/karaf-bundle-example/karaf-bundle-example-client/pom.xml
new file mode 100644
index 0000000000..04cf4b4e93
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-client/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-bundle-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-bundle-example-client</artifactId>
+    <name>Apache Karaf :: Examples :: Bundle :: Client</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-bundle-example-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>org.apache.karaf.examples.bundle.common,*</Import-Package>
+                        <Private-Package>org.apache.karaf.examples.bundle.client</Private-Package>
+                        <Bundle-Activator>org.apache.karaf.examples.bundle.client.Activator</Bundle-Activator>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/Activator.java b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/Activator.java
new file mode 100644
index 0000000000..89f7148d74
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/Activator.java
@@ -0,0 +1,66 @@
+/*
+ *  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.karaf.examples.bundle.client;
+
+import org.apache.karaf.examples.bundle.common.BookingService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class Activator implements BundleActivator {
+
+    private ServiceTracker<BookingService, BookingService> bookingServiceTracker;
+    private ServiceRegistration clientServiceRegistration;
+    private Display display;
+
+    @Override
+    public void start(BundleContext bundleContext) throws Exception {
+        bookingServiceTracker = new ServiceTracker<BookingService, BookingService>(bundleContext, BookingService.class, null) {
+
+            @Override
+            public BookingService addingService(ServiceReference<BookingService> reference) {
+                BookingService bookingService = bundleContext.getService(reference);
+
+                ClientServiceImpl clientService = new ClientServiceImpl();
+                clientService.setBookingService(bookingService);
+                clientServiceRegistration = bundleContext.registerService(ClientService.class, clientService, null);
+
+                display = new Display();
+                display.setClientService(clientService);
+                display.init();
+
+                return bookingService;
+            }
+
+            @Override
+            public void removedService(ServiceReference<BookingService> reference, BookingService service) {
+                display.destroy();
+
+                clientServiceRegistration.unregister();
+            }
+        };
+
+        bookingServiceTracker.open();
+    }
+
+    @Override
+    public void stop(BundleContext bundleContext) throws Exception {
+        bookingServiceTracker.close();
+    }
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/ClientService.java b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/ClientService.java
new file mode 100644
index 0000000000..f7211e1478
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/ClientService.java
@@ -0,0 +1,29 @@
+/*
+ *  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.karaf.examples.bundle.client;
+
+import org.apache.karaf.examples.bundle.common.Booking;
+
+import java.util.List;
+
+public interface ClientService {
+
+    List<Booking> bookings();
+
+    void addBooking(Booking booking);
+
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/ClientServiceImpl.java b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/ClientServiceImpl.java
new file mode 100644
index 0000000000..68997a1707
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/ClientServiceImpl.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.karaf.examples.bundle.client;
+
+import org.apache.karaf.examples.bundle.common.Booking;
+import org.apache.karaf.examples.bundle.common.BookingService;
+
+import java.util.List;
+
+/**
+ * Just an indirection service basically for the itest.
+ */
+public class ClientServiceImpl implements ClientService {
+
+    private BookingService bookingService;
+
+    @Override
+    public List<Booking> bookings() {
+        return bookingService.list();
+    }
+
+    @Override
+    public void addBooking(Booking booking) {
+        bookingService.add(booking);
+    }
+
+    public BookingService getBookingService() {
+        return bookingService;
+    }
+
+    public void setBookingService(BookingService bookingService) {
+        this.bookingService = bookingService;
+    }
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/Display.java b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/Display.java
new file mode 100644
index 0000000000..8e146f5c54
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-client/src/main/java/org/apache/karaf/examples/bundle/client/Display.java
@@ -0,0 +1,96 @@
+/*
+ *  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.karaf.examples.bundle.client;
+
+import org.apache.karaf.examples.bundle.common.Booking;
+
+/**
+ * Simple class getting the booking service (thanks to Blueprint), adding a random booking and displaying periodically.
+ */
+public class Display {
+
+    private ClientService clientService;
+
+    private BookingDisplayThread thread;
+    private boolean bookingThreadStarted = false;
+
+    /**
+     * This setter is used by Blueprint to inject the client service.
+     */
+    public void setClientService(ClientService clientService) {
+        this.clientService = clientService;
+    }
+
+    /**
+     * Init method used to start the thread.
+     */
+    public void init() {
+        BookingDisplayThread thread = new BookingDisplayThread(clientService);
+        thread.start();
+    }
+
+    /**
+     * Destroy method used to stop the thread.
+     */
+    public void destroy() {
+        thread.terminate();
+    }
+
+    /**
+     * Very simple thread adding random booking and displaying the bookings on System.out every 5s.
+     */
+    private class BookingDisplayThread extends Thread {
+
+        private ClientService clientService;
+        private volatile boolean running = true;
+
+        public BookingDisplayThread(ClientService clientService) {
+            this.clientService = clientService;
+        }
+
+        @Override
+        public void run() {
+            while (running) {
+                try {
+
+                    // TODO test
+                    Booking booking = new Booking("John Doo", "AF3030");
+                    clientService.addBooking(booking);
+
+                    System.out.println(displayBookings());
+                    Thread.sleep(5000);
+                } catch (Exception e) {
+                    // nothing to do
+                }
+            }
+        }
+
+        private String displayBookings() {
+            StringBuilder builder = new StringBuilder();
+            for (Booking booking : clientService.bookings()) {
+                builder.append(booking.getId()).append(" | ").append(booking.getCustomer()).append(" | ").append(booking.getFlight()).append("\n");
+            }
+            return builder.toString();
+        }
+
+        public void terminate() {
+            running = false;
+        }
+
+    }
+
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-common/pom.xml b/examples/karaf-bundle-example/karaf-bundle-example-common/pom.xml
new file mode 100644
index 0000000000..e311d2bc1b
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-common/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-bundle-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-bundle-example-common</artifactId>
+    <name>Apache Karaf :: Examples :: Bundle :: Common</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.bundle.common</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-common/src/main/java/org/apache/karaf/examples/bundle/common/Booking.java b/examples/karaf-bundle-example/karaf-bundle-example-common/src/main/java/org/apache/karaf/examples/bundle/common/Booking.java
new file mode 100644
index 0000000000..66d5fd839f
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-common/src/main/java/org/apache/karaf/examples/bundle/common/Booking.java
@@ -0,0 +1,61 @@
+/*
+ *  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.karaf.examples.bundle.common;
+
+import java.util.Random;
+
+/**
+ * A simple POJO describing a booking.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Booking(String customer, String flight) throws Exception {
+        this.id = new Random().nextLong();
+        this.customer = customer;
+        this.flight = flight;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-common/src/main/java/org/apache/karaf/examples/bundle/common/BookingService.java b/examples/karaf-bundle-example/karaf-bundle-example-common/src/main/java/org/apache/karaf/examples/bundle/common/BookingService.java
new file mode 100644
index 0000000000..33afe7e65a
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-common/src/main/java/org/apache/karaf/examples/bundle/common/BookingService.java
@@ -0,0 +1,32 @@
+/*
+ *  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.karaf.examples.bundle.common;
+
+import java.util.List;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    List<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-features/pom.xml b/examples/karaf-bundle-example/karaf-bundle-example-features/pom.xml
new file mode 100644
index 0000000000..01a3c34bb3
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-bundle-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-bundle-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: Bundle :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-features/src/main/feature/feature.xml b/examples/karaf-bundle-example/karaf-bundle-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..725c5270b0
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-features/src/main/feature/feature.xml
@@ -0,0 +1,35 @@
+<?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.
+-->
+<features name="karaf-bundle-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
+
+    <feature name="karaf-bundle-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-bundle-example-common/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-bundle-example-provider" version="${project.version}">
+        <feature>karaf-bundle-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-bundle-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-bundle-example-client" version="${project.version}">
+        <feature>karaf-bundle-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-bundle-example-client/${project.version}</bundle>
+    </feature>
+
+</features>
\ No newline at end of file
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-provider/pom.xml b/examples/karaf-bundle-example/karaf-bundle-example-provider/pom.xml
new file mode 100644
index 0000000000..786f96533d
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-provider/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-bundle-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-bundle-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: Bundle :: Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-bundle-example-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>org.apache.karaf.examples.bundle.provider.internal</Private-Package>
+                        <Bundle-Activator>org.apache.karaf.examples.bundle.provider.internal.Activator</Bundle-Activator>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-provider/src/main/java/org/apache/karaf/examples/bundle/provider/internal/Activator.java b/examples/karaf-bundle-example/karaf-bundle-example-provider/src/main/java/org/apache/karaf/examples/bundle/provider/internal/Activator.java
new file mode 100644
index 0000000000..b054b9a75b
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-provider/src/main/java/org/apache/karaf/examples/bundle/provider/internal/Activator.java
@@ -0,0 +1,43 @@
+/*
+ *  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.karaf.examples.bundle.provider.internal;
+
+import org.apache.karaf.examples.bundle.common.BookingService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class Activator implements BundleActivator {
+
+    private ServiceRegistration serviceRegistration;
+
+    @Override
+    public void start(BundleContext bundleContext) throws Exception {
+        // create a booking service impl instance
+        BookingServiceImpl bookingService = new BookingServiceImpl();
+        // registering the booking service in the service registry
+        serviceRegistration = bundleContext.registerService(BookingService.class, bookingService, null);
+    }
+
+    @Override
+    public void stop(BundleContext bundleContext) throws Exception {
+        if (serviceRegistration != null) {
+            // remove the service from the service registry
+            serviceRegistration.unregister();
+        }
+    }
+}
diff --git a/examples/karaf-bundle-example/karaf-bundle-example-provider/src/main/java/org/apache/karaf/examples/bundle/provider/internal/BookingServiceImpl.java b/examples/karaf-bundle-example/karaf-bundle-example-provider/src/main/java/org/apache/karaf/examples/bundle/provider/internal/BookingServiceImpl.java
new file mode 100644
index 0000000000..d755d7009a
--- /dev/null
+++ b/examples/karaf-bundle-example/karaf-bundle-example-provider/src/main/java/org/apache/karaf/examples/bundle/provider/internal/BookingServiceImpl.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.examples.bundle.provider.internal;
+
+import org.apache.karaf.examples.bundle.common.Booking;
+import org.apache.karaf.examples.bundle.common.BookingService;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Very simple implementation of a booking service.
+ */
+public class BookingServiceImpl implements BookingService {
+
+    private Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    public List<Booking> list() {
+        return new LinkedList<>(bookings.values());
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return bookings.get(id);
+    }
+
+    @Override
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+}
diff --git a/examples/karaf-bundle-example/pom.xml b/examples/karaf-bundle-example/pom.xml
new file mode 100644
index 0000000000..1192ffaa47
--- /dev/null
+++ b/examples/karaf-bundle-example/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-bundle-example</artifactId>
+    <name>Apache Karaf :: Examples :: Bundle</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-bundle-example-common</module>
+        <module>karaf-bundle-example-provider</module>
+        <module>karaf-bundle-example-client</module>
+        <!-- <module>karaf-blueprint-starter-annotation</module> -->
+        <module>karaf-bundle-example-features</module>
+    </modules>
+
+</project>
diff --git a/examples/karaf-command-example/README.md b/examples/karaf-command-example/README.md
new file mode 100644
index 0000000000..c30b54e53d
--- /dev/null
+++ b/examples/karaf-command-example/README.md
@@ -0,0 +1,85 @@
+<!--
+    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.
+-->
+# Apache Karaf Shell Command example
+
+## Abstract
+
+This example shows how to create a shell command.
+
+It provides a very simple command, calling a `BookingService`.
+
+## Artifacts
+
+* **karaf-command-example-api** is a common bundle providing the `Booking` POJO and the `BookingService` interface.
+* **karaf-command-example-provider** is a very simple Karaf bundle providing `BookingService` implementation.
+* **karaf-command-example-command** is the actual bundle providing the Karaf shell command.
+* **karaf-command-example-features** provides a Karaf features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, register the features repository:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-command-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the service provider feature:
+
+```
+karaf@root()> feature:install karaf-command-example-provider
+```
+
+The shell commands can be installed with the corresponding feature:
+
+```
+karaf@root()> feature:install karaf-command-example
+```
+
+## Usage
+
+Once you have installed the feature, you can see new commands available in the Apache Karaf shell.
+
+`booking:add` command adds a new booking in the booking service. For instance:
+
+```
+karaf@root()> booking:add AF520 Doe
+```
+
+`booking:list` command lists the current bookings:
+
+```
+karaf@root()> booking:list
+ID      │ Flight │ Customer
+────────┼────────┼─────────
+2226065 │ AF520  │ Doe
+```
+
+`booking:remove` command removes a booking from the booking service:
+
+```
+karaf@root()> booking:remove 2226065
+```
\ No newline at end of file
diff --git a/examples/karaf-command-example/karaf-command-example-api/pom.xml b/examples/karaf-command-example/karaf-command-example-api/pom.xml
new file mode 100644
index 0000000000..a90d289d6c
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-api/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-command-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-command-example-api</artifactId>
+    <name>Apache Karaf :: Examples :: Shell Command :: API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.command.api</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/Booking.java b/examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/Booking.java
new file mode 100644
index 0000000000..58e64d77a8
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/Booking.java
@@ -0,0 +1,52 @@
+/*
+ *  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.karaf.examples.command.api;
+
+/**
+ * A regular POJO.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/BookingService.java b/examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/BookingService.java
new file mode 100644
index 0000000000..6df79bfd9e
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/BookingService.java
@@ -0,0 +1,33 @@
+/*
+ *  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.karaf.examples.command.api;
+
+import java.util.Collection;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    Collection<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+    void remove(Long id);
+}
diff --git a/examples/karaf-command-example/karaf-command-example-command/pom.xml b/examples/karaf-command-example/karaf-command-example-command/pom.xml
new file mode 100644
index 0000000000..118bc5ad1a
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-command/pom.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-command-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-command-example-command</artifactId>
+    <name>Apache Karaf :: Examples :: Shell Command :: Command</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-command-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.command.command,
+                            org.apache.karaf.examples.command.completers
+                        </Private-Package>
+                        <Import-Package>
+                            org.apache.karaf.examples.command.api,
+                            org.apache.karaf.shell*;version="[4,5)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/AddCommand.java b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/AddCommand.java
new file mode 100644
index 0000000000..5585f19ea6
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/AddCommand.java
@@ -0,0 +1,61 @@
+/*
+ *  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.karaf.examples.command.command;
+
+import org.apache.karaf.examples.command.api.Booking;
+import org.apache.karaf.examples.command.api.BookingService;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.util.Random;
+import java.util.UUID;
+
+@Service
+@Command(scope = "booking", name = "add", description = "Add a booking")
+public class AddCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Option(name = "-i", aliases = "--id", description = "Booking ID", required = false, multiValued = false)
+    Long id = 0L;
+
+    @Argument(index = 0, name = "customer", description = "Booking customer", required = true, multiValued = false)
+    String customer;
+
+    @Argument(index = 1, name = "flight", description = "Booking flight", required = true, multiValued = false)
+    String flight;
+
+    @Override
+    public Object execute() throws Exception {
+        Booking booking = new Booking();
+        if (id == 0) {
+            Random random = new Random();
+            id = new Long(random.nextInt(9000000) + 1000000);
+        }
+        booking.setId(id);
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        bookingService.add(booking);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/ListCommand.java b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/ListCommand.java
new file mode 100644
index 0000000000..352572c67e
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/ListCommand.java
@@ -0,0 +1,47 @@
+/*
+ *  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.karaf.examples.command.command;
+
+import org.apache.karaf.examples.command.api.Booking;
+import org.apache.karaf.examples.command.api.BookingService;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.support.table.ShellTable;
+
+@Service
+@Command(scope = "booking", name = "list", description = "List the current bookings")
+public class ListCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Override
+    public Object execute() throws Exception {
+        ShellTable table = new ShellTable();
+        table.column("ID");
+        table.column("Flight");
+        table.column("Customer");
+        for (Booking booking : bookingService.list()) {
+            table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
+        }
+        table.print(System.out);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/RemoveCommand.java b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/RemoveCommand.java
new file mode 100644
index 0000000000..64a2bd00e1
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/command/RemoveCommand.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.examples.command.command;
+
+import org.apache.karaf.examples.command.api.BookingService;
+import org.apache.karaf.examples.command.completers.BookingIdCompleter;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.util.List;
+
+@Service
+@Command(scope = "booking", name = "remove", description = "Remove an existing bookings")
+public class RemoveCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Argument(index = 0, name = "ids", description = "List of bookings to remove", required = true, multiValued = true)
+    @Completion(BookingIdCompleter.class)
+    List<Long> ids;
+
+    @Override
+    public Object execute() throws Exception {
+        for (Long id : ids) {
+            bookingService.remove(id);
+        }
+        return null;
+    }
+
+}
diff --git a/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/completers/BookingIdCompleter.java b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/completers/BookingIdCompleter.java
new file mode 100644
index 0000000000..443def5280
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-command/src/main/java/org/apache/karaf/examples/command/completers/BookingIdCompleter.java
@@ -0,0 +1,45 @@
+/*
+ *  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.karaf.examples.command.completers;
+
+import org.apache.karaf.examples.command.api.Booking;
+import org.apache.karaf.examples.command.api.BookingService;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.console.CommandLine;
+import org.apache.karaf.shell.api.console.Completer;
+import org.apache.karaf.shell.api.console.Session;
+import org.apache.karaf.shell.support.completers.StringsCompleter;
+
+import java.util.List;
+
+@Service
+public class BookingIdCompleter implements Completer {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Override
+    public int complete(Session session, CommandLine commandLine, List<String> candidates) {
+        StringsCompleter delegate = new StringsCompleter();
+        for (Booking booking : bookingService.list()) {
+            delegate.getStrings().add(String.valueOf(booking.getId()));
+        }
+        return delegate.complete(session, commandLine, candidates);
+    }
+
+}
diff --git a/examples/karaf-command-example/karaf-command-example-features/pom.xml b/examples/karaf-command-example/karaf-command-example-features/pom.xml
new file mode 100644
index 0000000000..54b1e5349a
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-command-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-command-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: Shell Command :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-command-example/karaf-command-example-features/src/main/feature/feature.xml b/examples/karaf-command-example/karaf-command-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..04d90f2e3e
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-features/src/main/feature/feature.xml
@@ -0,0 +1,38 @@
+<?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.
+-->
+<features name="karaf-command-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-command-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-command-example-api/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-command-example-provider" version="${project.version}">
+        <feature version="${project.version}">karaf-command-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-command-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-command-example" version="${project.version}">
+        <feature version="${project.version}">karaf-command-example-provider</feature>
+        <conditional>
+            <condition>shell</condition>
+            <bundle>mvn:org.apache.karaf.examples/karaf-command-example-command/${project.version}</bundle>
+        </conditional>
+    </feature>
+
+</features>
diff --git a/examples/karaf-command-example/karaf-command-example-provider/pom.xml b/examples/karaf-command-example/karaf-command-example-provider/pom.xml
new file mode 100644
index 0000000000..d8cccf22ee
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-provider/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-command-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-command-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: Shell Command :: Service Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-command-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>org.apache.karaf.util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>org.apache.karaf.examples.command.provider.Activator</Bundle-Activator>
+                        <Private-Package>
+                            org.apache.karaf.examples.command.provider,
+                            org.apache.karaf.util.tracker,
+                            org.apache.karaf.util.tracker.annotation
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-command-example/karaf-command-example-provider/src/main/java/org/apache/karaf/examples/command/provider/Activator.java b/examples/karaf-command-example/karaf-command-example-provider/src/main/java/org/apache/karaf/examples/command/provider/Activator.java
new file mode 100644
index 0000000000..b42d0d3045
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-provider/src/main/java/org/apache/karaf/examples/command/provider/Activator.java
@@ -0,0 +1,37 @@
+/*
+ *  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.karaf.examples.command.provider;
+
+import org.apache.karaf.examples.command.api.BookingService;
+import org.apache.karaf.util.tracker.BaseActivator;
+import org.apache.karaf.util.tracker.annotation.ProvideService;
+import org.apache.karaf.util.tracker.annotation.Services;
+
+@Services(
+        provides = {
+                @ProvideService(BookingService.class)
+        }
+)
+public class Activator extends BaseActivator {
+
+    @Override
+    public void doStart() {
+        BookingServiceMemoryImpl bookingService = new BookingServiceMemoryImpl();
+        register(BookingService.class, bookingService);
+    }
+
+}
diff --git a/examples/karaf-command-example/karaf-command-example-provider/src/main/java/org/apache/karaf/examples/command/provider/BookingServiceMemoryImpl.java b/examples/karaf-command-example/karaf-command-example-provider/src/main/java/org/apache/karaf/examples/command/provider/BookingServiceMemoryImpl.java
new file mode 100644
index 0000000000..8884e9a381
--- /dev/null
+++ b/examples/karaf-command-example/karaf-command-example-provider/src/main/java/org/apache/karaf/examples/command/provider/BookingServiceMemoryImpl.java
@@ -0,0 +1,51 @@
+/*
+ *  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.karaf.examples.command.provider;
+
+import org.apache.karaf.examples.command.api.Booking;
+import org.apache.karaf.examples.command.api.BookingService;
+
+import java.util.*;
+
+/**
+ * Simple implementation of the {@link BookingService} storing the {@link org.apache.karaf.examples.command.api.Booking}
+ * instances in a list in memory.
+ */
+public class BookingServiceMemoryImpl implements BookingService {
+
+    private final Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    public Collection<Booking> list() {
+        return bookings.values();
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return bookings.get(id);
+    }
+
+    @Override
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+    @Override
+    public void remove(Long id) {
+        bookings.remove(id);
+    }
+}
diff --git a/examples/karaf-command-example/pom.xml b/examples/karaf-command-example/pom.xml
new file mode 100644
index 0000000000..5fbfd06c6d
--- /dev/null
+++ b/examples/karaf-command-example/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-command-example</artifactId>
+    <name>Apache Karaf :: Examples :: Shell Command</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-command-example-api</module>
+        <module>karaf-command-example-provider</module>
+        <module>karaf-command-example-command</module>
+        <module>karaf-command-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-deployer-example/README.md b/examples/karaf-deployer-example/README.md
new file mode 100644
index 0000000000..e16d986a7f
--- /dev/null
+++ b/examples/karaf-deployer-example/README.md
@@ -0,0 +1,67 @@
+<!--
+    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.
+-->
+# Apache Karaf Deployer example
+
+## Abstract
+
+This example shows how to create a Karaf deployer.
+
+Karaf uses deployer services on the `deploy` folder (using Felix FileInstall). For each file in the `deploy`, Karaf calls
+each deployer service to know:
+
+1. If the deployer service should handle the file (based on file contain, file name, ...)
+2. Actually let the deployer service deploys the file.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Deployment
+
+On a running Karaf instance, just install the deployer service using:
+
+```
+karaf@root()> feature:install scr
+karaf@root()> bundle:install -s mvn:org.apache.karaf.examples/karaf-deployer-example/4.2.1-SNAPSHOT
+```
+
+
+## Usage
+
+Once deployed, you can drop any file in the `deploy` folder, you should see (for instance, if you dropped a file name `TEST` in the `deploy` folder):
+
+```
+Example deployer should install TEST
+```
+
+If you change the file, you should see:
+
+```
+Example deployer should update TEST
+```
+
+And if you remove the file from the `deploy` folder, you should see:
+
+```
+Example deployer should uninstall TEST
+```
\ No newline at end of file
diff --git a/examples/karaf-deployer-example/pom.xml b/examples/karaf-deployer-example/pom.xml
new file mode 100644
index 0000000000..ccbafac486
--- /dev/null
+++ b/examples/karaf-deployer-example/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-deployer-example</artifactId>
+    <name>Apache Karaf :: Examples :: Deployer</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.fileinstall</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package/>
+                        <Private-Package>
+                            org.apache.karaf.examples.deployer
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-deployer-example/src/main/java/org/apache/karaf/examples/deployer/ExampleDeployer.java b/examples/karaf-deployer-example/src/main/java/org/apache/karaf/examples/deployer/ExampleDeployer.java
new file mode 100644
index 0000000000..d8f456218d
--- /dev/null
+++ b/examples/karaf-deployer-example/src/main/java/org/apache/karaf/examples/deployer/ExampleDeployer.java
@@ -0,0 +1,52 @@
+/*
+ * 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.karaf.examples.deployer;
+
+import org.apache.felix.fileinstall.ArtifactInstaller;
+import org.apache.felix.fileinstall.ArtifactListener;
+import org.osgi.service.component.annotations.Component;
+
+import java.io.File;
+
+@Component(service = { ArtifactInstaller.class, ArtifactListener.class })
+public class ExampleDeployer implements ArtifactInstaller {
+
+
+    @Override
+    public void install(File file) throws Exception {
+        System.out.println("Example deployer should install " + file.getName());
+    }
+
+    @Override
+    public void update(File file) throws Exception {
+        System.out.println("Example deployer should update " + file.getName());
+    }
+
+    @Override
+    public void uninstall(File file) throws Exception {
+        System.out.println("Example deployer should uninstall " + file.getName());
+    }
+
+    @Override
+    public boolean canHandle(File file) {
+        // here we check if the deployer should handle the file (true) or not (false)
+        // for the example, we take any file
+        return true;
+    }
+}
diff --git a/examples/karaf-dump-example/README.md b/examples/karaf-dump-example/README.md
new file mode 100644
index 0000000000..f921c1aa95
--- /dev/null
+++ b/examples/karaf-dump-example/README.md
@@ -0,0 +1,68 @@
+<!--
+    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.
+-->
+# Apache Karaf Diagnostic Dump example
+
+## Abstract
+
+This example shows how to create a new dump provider service. This provider is automatically included in the dump created
+by the `dev:dump-create` command.
+
+The dump provider example actually takes a screenshot of client screen.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Deployment
+
+On a running Karaf instance, install the scr feature and the dump bundle:
+
+```
+karaf@root()> feature:install scr
+karaf@root()> bundle:install -s mvn:org.apache.karaf.examples/karaf-dump-example/4.2.1-SNAPSHOT
+```
+
+## Usage
+
+Once you have installed the bundle, you can take a dump using:
+
+```
+karaf@root()> dev:dump-create
+```
+
+You will find the dump zip file in the Karaf home folder. If you extract this zip, in addition of the regular files (heap dump, thread dump, ...),
+you will see screenshot files created by our example dump provider:
+
+```
+Archive:  xxxx-xx-xx_xxxxxx.zip
+  inflating: environment.txt         
+  inflating: memory.txt              
+  inflating: threads.txt             
+  inflating: heapdump.txt            
+  inflating: bundles.txt             
+  inflating: features.txt            
+  inflating: screenshot/display_0.png  
+  inflating: screenshot/display_1.png  
+  inflating: log/security.log        
+  inflating: log/karaf.log  
+```
diff --git a/demos/dump/pom.xml b/examples/karaf-dump-example/pom.xml
similarity index 80%
rename from demos/dump/pom.xml
rename to examples/karaf-dump-example/pom.xml
index dc465a0ee9..913cfc35a5 100644
--- a/demos/dump/pom.xml
+++ b/examples/karaf-dump-example/pom.xml
@@ -10,7 +10,7 @@
         (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
+           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,
@@ -22,17 +22,22 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>demos</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>dump</artifactId>
+    <artifactId>karaf-dump-example</artifactId>
     <packaging>bundle</packaging>
-    <name>Apache Karaf :: Demos :: Demo Dump provider</name>
+    <name>Apache Karaf :: Examples :: Dump</name>
 
     <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.karaf.diagnostic</groupId>
             <artifactId>org.apache.karaf.diagnostic.core</artifactId>
@@ -46,18 +51,17 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
+                        <Export-Package>
+                            org.apache.karaf.examples.dump
+                        </Export-Package>
                         <Import-Package>
                             org.apache.karaf.diagnostic.core,
                             *
                         </Import-Package>
-                        <Private-Package>!*</Private-Package>
-                        <Export-Package>
-                            org.apache.karaf.diagnostic.demo
-                        </Export-Package>
                     </instructions>
                 </configuration>
             </plugin>
         </plugins>
     </build>
 
-</project>
+</project>
\ No newline at end of file
diff --git a/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java b/examples/karaf-dump-example/src/main/java/org/apache/karaf/examples/dump/ScreenshotDumpProvider.java
similarity index 87%
rename from demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java
rename to examples/karaf-dump-example/src/main/java/org/apache/karaf/examples/dump/ScreenshotDumpProvider.java
index b8bb7d1e73..33c6376c66 100644
--- a/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java
+++ b/examples/karaf-dump-example/src/main/java/org/apache/karaf/examples/dump/ScreenshotDumpProvider.java
@@ -1,60 +1,56 @@
-/*
- * 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.karaf.diagnostic.demo;
-
-import java.awt.DisplayMode;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
-import java.awt.Rectangle;
-import java.awt.Robot;
-import java.awt.image.BufferedImage;
-import java.io.OutputStream;
-
-import javax.imageio.ImageIO;
-
-import org.apache.karaf.diagnostic.core.DumpDestination;
-import org.apache.karaf.diagnostic.core.DumpProvider;
-
-/**
- * This demo provider creates images in dump destination which
- * contains screenshots from all attached displays.
- */
-public class ScreenshotDumpProvider implements DumpProvider {
-
-	/**
-	 * {@inheritDoc}
-	 */
-    public void createDump(DumpDestination destination) throws Exception {
-        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        // get all graphic devices attached to computer
-        GraphicsDevice[] gs = ge.getScreenDevices();
-
-        // create dump entry for each device  
-        for (int i=0; i < gs.length; i++) {
-            DisplayMode mode = gs[i].getDisplayMode();
-            Rectangle bounds = new Rectangle(0, 0, mode.getWidth(), mode.getHeight());
-            BufferedImage screenshot = new Robot(gs[i]).createScreenCapture(bounds);
-
-            // to attach your entry to destination you have to execute this line
-            OutputStream outputStream = destination.add("screenshot/display_" + i + ".png");
-            ImageIO.write(screenshot, "PNG", outputStream);
-
-            outputStream.close();
-        }
-
-    }
-
-}
+/*
+ * 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.karaf.examples.dump;
+
+import java.awt.DisplayMode;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.image.BufferedImage;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+import org.apache.karaf.diagnostic.core.DumpDestination;
+import org.apache.karaf.diagnostic.core.DumpProvider;
+import org.osgi.service.component.annotations.Component;
+
+@Component
+public class ScreenshotDumpProvider implements DumpProvider {
+
+    @Override
+    public void createDump(DumpDestination destination) throws Exception {
+        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+        // get all graphic devices attached to computer
+        GraphicsDevice[] gs = ge.getScreenDevices();
+
+        // create dump entry for each device
+        for (int i=0; i < gs.length; i++) {
+            DisplayMode mode = gs[i].getDisplayMode();
+            Rectangle bounds = new Rectangle(0, 0, mode.getWidth(), mode.getHeight());
+            BufferedImage screenshot = new Robot(gs[i]).createScreenCapture(bounds);
+
+            // to attach your entry to destination you have to execute this line
+            OutputStream outputStream = destination.add("screenshot/display_" + i + ".png");
+            ImageIO.write(screenshot, "PNG", outputStream);
+
+            outputStream.close();
+        }
+
+    }
+
+}
diff --git a/examples/karaf-itest-example/README.md b/examples/karaf-itest-example/README.md
new file mode 100644
index 0000000000..c7aa16616b
--- /dev/null
+++ b/examples/karaf-itest-example/README.md
@@ -0,0 +1,47 @@
+<!--
+    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.
+-->
+# Apache Karaf Integration Test example
+
+## Abstract
+
+This example shows how to create integration tests.
+
+In addition of unit tests you do in each bundles, you can easily implement integration test in Karaf.
+
+The life cycle is basically:
+
+1. Download and extract any Apache Karaf version.
+2. Start the Karaf instance (eventually overwriting some configuration).
+3. Execution some actions on this running instance (executing shell commandes, installing features, ...).
+4. Verify if the instance state is the expected one.
+
+This simple example shows how to extend `KarafTestSupport` and implements a test performing shell commands and verify
+the results.
+
+## Artifacts
+
+The example itself is a Maven project performing the tests.
+
+## Build & Executing Tests
+
+To test, simply use:
+
+```
+mvn clean test
+```
\ No newline at end of file
diff --git a/examples/karaf-itest-example/pom.xml b/examples/karaf-itest-example/pom.xml
new file mode 100644
index 0000000000..d1ab1ab9fc
--- /dev/null
+++ b/examples/karaf-itest-example/pom.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-itest-example</artifactId>
+    <name>Apache Karaf :: Examples :: Integration Tests</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <!-- Provide the KarafTestSupport -->
+        <dependency>
+            <groupId>org.apache.karaf.itests</groupId>
+            <artifactId>common</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <!-- Define the Apache Karaf version to download and use for the test -->
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>apache-karaf</artifactId>
+            <version>4.2.0</version>
+            <scope>test</scope>
+            <type>tar.gz</type>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- Required to use shell commands in the tests -->
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- Provide the PaxExam Karaf support -->
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-karaf</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- Provide the PaxExam JUnit extension -->
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.hamcrest</artifactId>
+            <version>1.3_1</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-depends-file</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java b/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java
new file mode 100644
index 0000000000..8587b45777
--- /dev/null
+++ b/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed 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.karaf.examples.itests;
+
+import org.apache.karaf.features.Feature;
+import org.apache.karaf.features.FeaturesService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.options.LogLevelOption;
+import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import java.io.File;
+
+import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class ExampleITest extends KarafTestSupport {
+
+    @Override
+    @Configuration
+    public Option[] config() {
+        MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf").versionAsInProject().type("tar.gz");
+
+        String httpPort = Integer.toString(getAvailablePort(Integer.parseInt(MIN_HTTP_PORT), Integer.parseInt(MAX_HTTP_PORT)));
+        String rmiRegistryPort = Integer.toString(getAvailablePort(Integer.parseInt(MIN_RMI_REG_PORT), Integer.parseInt(MAX_RMI_REG_PORT)));
+        String rmiServerPort = Integer.toString(getAvailablePort(Integer.parseInt(MIN_RMI_SERVER_PORT), Integer.parseInt(MAX_RMI_SERVER_PORT)));
+        String sshPort = Integer.toString(getAvailablePort(Integer.parseInt(MIN_SSH_PORT), Integer.parseInt(MAX_SSH_PORT)));
+        String localRepository = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
+        if (localRepository == null) {
+            localRepository = "";
+        }
+
+        return new Option[]{
+                //KarafDistributionOption.debugConfiguration("8889", true),
+                karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
+                // enable JMX RBAC security, thanks to the KarafMBeanServerBuilder
+                configureSecurity().disableKarafMBeanServerBuilder(),
+                // configureConsole().ignoreLocalConsole(),
+                keepRuntimeFolder(),
+                logLevel(LogLevelOption.LogLevel.INFO),
+                mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject(),
+                mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
+                mavenBundle().groupId("org.apache.karaf.itests").artifactId("common").versionAsInProject(),
+                editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", httpPort),
+                editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
+                editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
+                editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort),
+                editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.localRepository", localRepository)
+        };
+    }
+
+    @Test
+    public void listBundleCommand() throws Exception {
+        // assert on an available service
+        assertServiceAvailable(FeaturesService.class);
+
+        // installing a feature and verifying that it's correctly installed
+        installAndAssertFeature("scr");
+
+        // testing a command execution
+        String bundles = executeCommand("bundle:list -t 0");
+        System.out.println(bundles);
+        assertContains("junit", bundles);
+
+        String features = executeCommand("feature:list -i");
+        System.out.print(features);
+        assertContains("scr", features);
+
+        // using a service and assert state or result
+        FeaturesService featuresService = getOsgiService(FeaturesService.class);
+        Feature scr = featuresService.getFeature("scr");
+        Assert.assertEquals("scr", scr.getName());
+    }
+
+}
diff --git a/examples/karaf-jdbc-example/README.md b/examples/karaf-jdbc-example/README.md
new file mode 100644
index 0000000000..c801ed67ef
--- /dev/null
+++ b/examples/karaf-jdbc-example/README.md
@@ -0,0 +1,94 @@
+<!--
+    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.
+-->
+# Apache Karaf JDBC example
+
+## Abstract
+
+This example shows how to use simple JDBC implementation using Pax-JDBC with an Apache Derby embedded database.
+
+It provides a very simple command, calling a `BookingService`.
+
+## Artifacts
+
+* **karaf-jdbc-example-api** is a common bundle providing the `Booking` POJO and the `BookingService` interface.
+* **karaf-jdbc-example-provider** is a very simple Karaf bundle providing `BookingService` implementation.
+* **karaf-jdbc-example-command** is the actual bundle providing the Karaf shell command.
+* **karaf-jdbc-example-features** provides a Karaf features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, register the features repository:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-jdbc-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the service provider feature:
+
+```
+karaf@root()> feature:install karaf-jdbc-example-provider
+```
+
+The shell commands can be installed with the corresponding feature:
+
+```
+karaf@root()> feature:install karaf-jdbc-example
+```
+
+## Usage
+
+Once you have installed the feature, you can see new commands available in the Apache Karaf shell.
+
+`booking:add` command adds a new booking in the booking service. For instance:
+
+```
+karaf@root()> booking:add Doe AF520
+```
+
+`booking:list` command lists the current bookings:
+
+```
+karaf@root()> booking:list
+ID      │ Flight │ Customer
+────────┼────────┼─────────
+1       │ AF520  │ Doe
+```
+
+`booking:get` command get the booking with id:
+
+```
+karaf@root()> booking:get 1
+ID      │ Flight │ Customer
+────────┼────────┼─────────
+1       │ AF520  │ Doe
+```
+
+`booking:remove` command removes a booking from the booking service:
+
+```
+karaf@root()> booking:remove 1
+```
\ No newline at end of file
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-api/pom.xml b/examples/karaf-jdbc-example/karaf-jdbc-example-api/pom.xml
new file mode 100644
index 0000000000..a4e13ab71a
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-api/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jdbc-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jdbc-example-api</artifactId>
+    <name>Apache Karaf :: Examples :: JDBC :: API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.jdbc.api</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-api/src/main/java/org/apache/karaf/examples/jdbc/api/Booking.java b/examples/karaf-jdbc-example/karaf-jdbc-example-api/src/main/java/org/apache/karaf/examples/jdbc/api/Booking.java
new file mode 100644
index 0000000000..f2875f65fa
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-api/src/main/java/org/apache/karaf/examples/jdbc/api/Booking.java
@@ -0,0 +1,52 @@
+/*
+ *  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.karaf.examples.jdbc.api;
+
+/**
+ * A regular POJO.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-api/src/main/java/org/apache/karaf/examples/jdbc/api/BookingService.java b/examples/karaf-jdbc-example/karaf-jdbc-example-api/src/main/java/org/apache/karaf/examples/jdbc/api/BookingService.java
new file mode 100644
index 0000000000..7898672783
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-api/src/main/java/org/apache/karaf/examples/jdbc/api/BookingService.java
@@ -0,0 +1,33 @@
+/*
+ *  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.karaf.examples.jdbc.api;
+
+import java.util.Collection;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    Collection<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+    void remove(Long id);
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-command/pom.xml b/examples/karaf-jdbc-example/karaf-jdbc-example-command/pom.xml
new file mode 100644
index 0000000000..f53e944e4f
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-command/pom.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jdbc-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jdbc-example-command</artifactId>
+    <name>Apache Karaf :: Examples :: JDBC :: Command</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jdbc-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.jdbc.command,
+                            org.apache.karaf.examples.jdbc.completers
+                        </Private-Package>
+                        <Import-Package>
+                            org.apache.karaf.examples.jdbc.api,
+                            org.apache.karaf.shell*;version="[4,5)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/AddCommand.java b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/AddCommand.java
new file mode 100644
index 0000000000..c328e3114c
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/AddCommand.java
@@ -0,0 +1,61 @@
+/*
+ *  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.karaf.examples.jdbc.command;
+
+import org.apache.karaf.examples.jdbc.api.Booking;
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.util.Random;
+import java.util.UUID;
+
+@Service
+@Command(scope = "booking", name = "add", description = "Add a booking")
+public class AddCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Option(name = "-i", aliases = "--id", description = "Booking ID", required = false, multiValued = false)
+    Long id = 0L;
+
+    @Argument(index = 0, name = "customer", description = "Booking customer", required = true, multiValued = false)
+    String customer;
+
+    @Argument(index = 1, name = "flight", description = "Booking flight", required = true, multiValued = false)
+    String flight;
+
+    @Override
+    public Object execute() throws Exception {
+        Booking booking = new Booking();
+        if (id == 0) {
+            Random random = new Random();
+            id = new Long(random.nextInt(9000000) + 1000000);
+        }
+        booking.setId(id);
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        bookingService.add(booking);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/GetCommand.java b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/GetCommand.java
new file mode 100644
index 0000000000..519d81b276
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/GetCommand.java
@@ -0,0 +1,55 @@
+/*
+ *  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.karaf.examples.jdbc.command;
+
+import org.apache.karaf.examples.jdbc.api.Booking;
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.apache.karaf.examples.jdbc.completers.BookingIdCompleter;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.support.table.ShellTable;
+
+import java.util.List;
+
+@Service
+@Command(scope = "booking", name = "get", description = "Get the booking by id")
+public class GetCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Argument(index = 0, name = "id", description = "Id of booking to retreive", required = true, multiValued = false)
+    @Completion(BookingIdCompleter.class)
+    Long id;
+
+    @Override
+    public Object execute() throws Exception {
+        ShellTable table = new ShellTable();
+        table.column("ID");
+        table.column("Flight");
+        table.column("Customer");
+        Booking booking = bookingService.get(id);
+        table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
+        table.print(System.out);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/ListCommand.java b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/ListCommand.java
new file mode 100644
index 0000000000..f89d9f43a9
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/ListCommand.java
@@ -0,0 +1,47 @@
+/*
+ *  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.karaf.examples.jdbc.command;
+
+import org.apache.karaf.examples.jdbc.api.Booking;
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.support.table.ShellTable;
+
+@Service
+@Command(scope = "booking", name = "list", description = "List the current bookings")
+public class ListCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Override
+    public Object execute() throws Exception {
+        ShellTable table = new ShellTable();
+        table.column("ID");
+        table.column("Flight");
+        table.column("Customer");
+        for (Booking booking : bookingService.list()) {
+            table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
+        }
+        table.print(System.out);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/RemoveCommand.java b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/RemoveCommand.java
new file mode 100644
index 0000000000..5449ec8179
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/command/RemoveCommand.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.examples.jdbc.command;
+
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.apache.karaf.examples.jdbc.completers.BookingIdCompleter;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.util.List;
+
+@Service
+@Command(scope = "booking", name = "remove", description = "Remove an existing bookings")
+public class RemoveCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Argument(index = 0, name = "ids", description = "List of bookings to remove", required = true, multiValued = true)
+    @Completion(BookingIdCompleter.class)
+    List<Long> ids;
+
+    @Override
+    public Object execute() throws Exception {
+        for (Long id : ids) {
+            bookingService.remove(id);
+        }
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/completers/BookingIdCompleter.java b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/completers/BookingIdCompleter.java
new file mode 100644
index 0000000000..9d913f72fd
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-command/src/main/java/org/apache/karaf/examples/jdbc/completers/BookingIdCompleter.java
@@ -0,0 +1,45 @@
+/*
+ *  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.karaf.examples.jdbc.completers;
+
+import org.apache.karaf.examples.jdbc.api.Booking;
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.console.CommandLine;
+import org.apache.karaf.shell.api.console.Completer;
+import org.apache.karaf.shell.api.console.Session;
+import org.apache.karaf.shell.support.completers.StringsCompleter;
+
+import java.util.List;
+
+@Service
+public class BookingIdCompleter implements Completer {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Override
+    public int complete(Session session, CommandLine commandLine, List<String> candidates) {
+        StringsCompleter delegate = new StringsCompleter();
+        for (Booking booking : bookingService.list()) {
+            delegate.getStrings().add(String.valueOf(booking.getId()));
+        }
+        return delegate.complete(session, commandLine, candidates);
+    }
+
+}
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-features/pom.xml b/examples/karaf-jdbc-example/karaf-jdbc-example-features/pom.xml
new file mode 100644
index 0000000000..c5834f7aa2
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jdbc-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jdbc-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: JDBC :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-features/src/main/feature/feature.xml b/examples/karaf-jdbc-example/karaf-jdbc-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..f7e2e709af
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-features/src/main/feature/feature.xml
@@ -0,0 +1,62 @@
+<?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.
+-->
+<features name="karaf-jdbc-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-jdbc-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-jdbc-example-api/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-jdbc-example-provider" version="${project.version}">
+        <config name="org.ops4j.datasource-karaf-example">
+            osgi.jdbc.driver.class=org.apache.derby.jdbc.EmbeddedDriver
+            dataSourceName=jdbc/karaf-example
+            url=jdbc:derby:data/example/derby;create=true
+        </config>
+        
+        <config name="org.apache.karaf.examples.jdbc">
+            ###############################################
+            # Karaf Examples Registry Storage JDBC Configuration
+            ###############################################
+            
+            # Name of the JDBC datasource
+            datasource.name=jdbc/karaf-example
+            
+            # Dialect (type of the database)
+            # The dialect is used to create the tables
+            # Supported dialects are: generic, derby, mysql
+            dialect=derby
+        </config>
+        
+        <feature version="${project.version}">karaf-jdbc-example-common</feature>
+        <feature>scr</feature>
+        <feature>jdbc</feature>
+        <feature>pax-jdbc-derby</feature>
+        <feature dependency="true">aries-blueprint</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jdbc-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-jdbc-example" version="${project.version}">
+        <feature version="${project.version}">karaf-jdbc-example-provider</feature>
+        <conditional>
+            <condition>shell</condition>
+            <bundle>mvn:org.apache.karaf.examples/karaf-jdbc-example-command/${project.version}</bundle>
+        </conditional>
+    </feature>
+
+</features>
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-provider/pom.xml b/examples/karaf-jdbc-example/karaf-jdbc-example-provider/pom.xml
new file mode 100644
index 0000000000..4e1fe69484
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-provider/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jdbc-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jdbc-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: JDBC :: Service Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jdbc-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>org.apache.karaf.util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.jdbc.provider,
+                            org.apache.karaf.util.tracker,
+                            org.apache.karaf.util.tracker.annotation
+                        </Private-Package>
+                        <Import-Package>*</Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jdbc-example/karaf-jdbc-example-provider/src/main/java/org/apache/karaf/examples/jdbc/provider/BookingServiceJdbcImpl.java b/examples/karaf-jdbc-example/karaf-jdbc-example-provider/src/main/java/org/apache/karaf/examples/jdbc/provider/BookingServiceJdbcImpl.java
new file mode 100644
index 0000000000..a8f41a90c7
--- /dev/null
+++ b/examples/karaf-jdbc-example/karaf-jdbc-example-provider/src/main/java/org/apache/karaf/examples/jdbc/provider/BookingServiceJdbcImpl.java
@@ -0,0 +1,245 @@
+/*
+ *  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.karaf.examples.jdbc.provider;
+
+import org.apache.karaf.examples.jdbc.api.Booking;
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.*;
+
+/**
+ * Simple implementation of the {@link BookingService} storing the {@link org.apache.karaf.examples.jdbc.api.Booking}
+ * instances in a list in memory.
+ */
+@Component(
+        name = "org.apache.karaf.examples.jdbc.provider.bookingService",
+        immediate = true
+)
+public class BookingServiceJdbcImpl implements BookingService {
+
+    private final static Logger LOGGER = LoggerFactory.getLogger(BookingService.class);
+
+    private final static String DATABASE_SCHEMA = "KARAF_EXAMPLE";
+
+    private final static String[] createTableQueryDerbyTemplate = new String[] {
+            "CREATE SCHEMA " + DATABASE_SCHEMA,
+
+            "CREATE TABLE " + DATABASE_SCHEMA + ".BOOKING(id SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY "
+                    + " CONSTRAINT BOOKING_PK PRIMARY KEY, customer VARCHAR(200) NOT NULL, flight VARCHAR(100))"};
+
+    /** Select queries */
+    private final static String selectBookingSql =
+            "select id, customer, flight "
+                    + "from " + DATABASE_SCHEMA + ".BOOKING";
+
+    /** Insert queries */
+    private final static String insertBookingSql =
+            "insert into " + DATABASE_SCHEMA + ".BOOKING "
+                    + "(customer, flight) "
+                    + "values (?, ?)";
+
+    /** Update queries */
+    private final static String updateBookingSql =
+            "update " + DATABASE_SCHEMA + ".BOOKING "
+                    + "set customer = ?, flight = ?"
+                    + "where id = ?";
+
+    /** Delete queries */
+    private final static String deleteBookingSql =
+            "delete from " + DATABASE_SCHEMA + ".BOOKING "
+                    + "where id = ?";
+
+    @Reference(target = "(osgi.jndi.service.name=jdbc/karaf-example)")
+    private DataSource dataSource;
+
+    @Activate
+    public void activate(ComponentContext context) {
+        open(context.getProperties());
+    }
+
+
+    public void open(Dictionary<String, Object> config) {
+        LOGGER.debug("Datasource {} ", this.dataSource);
+        try (Connection connection = dataSource.getConnection()) {
+            createTables(connection);
+        } catch (Exception e) {
+            LOGGER.error("Error creating table ", e);
+        }
+    }
+
+    private String getValue(Dictionary<String, Object> config, String key, String defaultValue) {
+        String value = (String) config.get(key);
+        return (value != null) ? value : defaultValue;
+    }
+
+    private void createTables(Connection connection) {
+
+        DatabaseMetaData dbm;
+        ResultSet tables;
+
+        try {
+            dbm = connection.getMetaData();
+
+            tables = dbm.getTables(null, "KARAF_EXAMPLE", "BOOKING", null);
+            if (!tables.next()) {
+                LOGGER.info("Tables does not exist");
+                // Tables does not exist so we create all the tables
+                String[] createTemplate = createTemplate = createTableQueryDerbyTemplate;
+                try (Statement createStatement = connection.createStatement()) {
+                    for (int cpt = 0; cpt < createTemplate.length; cpt++) {
+                        createStatement.addBatch(createTemplate[cpt]);
+                    }
+                    if (createStatement.executeBatch().length == 0) {
+                        throw new SQLException("No table has been created !");
+                    }
+                    LOGGER.info("Schema and tables has been created");
+                } catch (SQLException exception) {
+                    LOGGER.error("Can't create tables", exception);
+                }
+            } else {
+                LOGGER.info("Tables already exist");
+            }
+        } catch (SQLException exception) {
+            LOGGER.error("Can't verify tables existence", exception);
+        }
+    }
+
+    @Override
+    public Collection<Booking> list() {
+        Collection<Booking> bookings = new ArrayList<>();
+
+        try (Connection connection = dataSource.getConnection()) {
+
+            try (PreparedStatement selectStatement = connection.prepareStatement(selectBookingSql)) {
+                ResultSet rs = selectStatement.executeQuery();
+
+                while (rs.next()) {
+                    Booking booking = new Booking();
+                    booking.setId(rs.getLong("id"));
+                    booking.setCustomer(rs.getString("customer"));
+                    booking.setFlight(rs.getString("flight"));
+                    bookings.add(booking);
+                }
+
+            } catch (SQLException exception) {
+                LOGGER.error("Can't retreive the bookings", exception);
+            }
+
+        } catch (Exception exception) {
+            LOGGER.error("Error getting connection ", exception);
+        }
+        return bookings;
+    }
+
+    @Override
+    public Booking get(Long id) {
+        try (Connection connection = dataSource.getConnection()) {
+
+            String sqlQuery = selectBookingSql + " where id = ?";
+
+            try (PreparedStatement selectStatement = connection.prepareStatement(sqlQuery)) {
+                selectStatement.setLong(1, id);
+                ResultSet rs = selectStatement.executeQuery();
+
+                if (rs.next()) {
+                    Booking booking = new Booking();
+                    booking.setId(id);
+                    booking.setCustomer(rs.getString("customer"));
+                    booking.setFlight(rs.getString("flight"));
+                    return booking;
+                }
+
+            } catch (SQLException exception) {
+                LOGGER.error("Can't find booking with id {}", id, exception);
+            }
+
+        } catch (Exception exception) {
+            LOGGER.error("Error getting connection ", exception);
+        }
+        return null;
+    }
+
+    @Override
+    public void add(Booking booking) {
+        try (Connection connection = dataSource.getConnection()) {
+
+            if (connection.getAutoCommit()) {
+                connection.setAutoCommit(false);
+            }
+
+            try (PreparedStatement insertStatement =
+                         connection.prepareStatement(insertBookingSql, PreparedStatement.RETURN_GENERATED_KEYS)) {
+                // set values
+                insertStatement.setString(1, booking.getCustomer());
+                insertStatement.setString(2, booking.getFlight());
+                insertStatement.executeUpdate();
+
+                int newId = 0;
+                ResultSet rs = insertStatement.getGeneratedKeys();
+
+                if (rs.next()) {
+                    newId = rs.getInt(1);
+                }
+
+                connection.commit();
+
+                booking.setId(new Long(newId));
+                LOGGER.debug("Booking created with id = {}", newId);
+
+            } catch (SQLException exception) {
+                connection.rollback();
+                LOGGER.error("Can't insert booking with customer {}", booking.getCustomer(), exception);
+            }
+
+        } catch (Exception exception) {
+            LOGGER.error("Error getting connection ", exception);
+        }
+    }
+
+    @Override
+    public void remove(Long id) {
+        try (Connection connection = dataSource.getConnection()) {
+
+            if (connection.getAutoCommit()) {
+                connection.setAutoCommit(false);
+            }
+
+            try (PreparedStatement deleteStatement =
+                         connection.prepareStatement(deleteBookingSql)) {
+                // where values
+                deleteStatement.setInt(1, id.intValue());
+                deleteStatement.executeUpdate();
+                connection.commit();
+                LOGGER.debug("Service deleted with id = {}", id);
+            } catch (SQLException exception) {
+                connection.rollback();
+                LOGGER.error("Can't delete service with id {}", id, exception);
+            }
+
+        } catch (Exception exception) {
+            LOGGER.error("Error getting connection ", exception);
+        }
+    }
+}
diff --git a/examples/karaf-jdbc-example/pom.xml b/examples/karaf-jdbc-example/pom.xml
new file mode 100644
index 0000000000..79691d1b8b
--- /dev/null
+++ b/examples/karaf-jdbc-example/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jdbc-example</artifactId>
+    <name>Apache Karaf :: Examples :: JDBC</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-jdbc-example-api</module>
+        <module>karaf-jdbc-example-provider</module>
+        <module>karaf-jdbc-example-command</module>
+        <module>karaf-jdbc-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jms-example/README.md b/examples/karaf-jms-example/README.md
new file mode 100644
index 0000000000..ef76cf6b1a
--- /dev/null
+++ b/examples/karaf-jms-example/README.md
@@ -0,0 +1,86 @@
+<!--
+    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.
+-->
+# Apache Karaf JMS Example
+
+## Abstract
+
+The JMS section of the user guide shows how to create connection factories and manipulate JMS using the Apache Karaf provided `jms:*` commands and related.
+
+This example shows how to use the JMS Karaf feature from a developer perspective. It directly uses a JMS `ConnectionFactory` service in code that you can implement to interact with JMS.
+
+## Artifacts
+
+* **karaf-jms-example-command** is a command bundle using JMS code with a `ConnectionFactory` service.
+* **karaf-jms-example-features** is a features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, register the features repository:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-jms-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the `karaf-jms-example-activemq` feature:
+
+```
+karaf@root()> feature:install karaf-jms-example-activemq
+```
+
+It will install an Apache ActiveMQ in your running Karaf instance, providing a complete embedded ActiveMQ broker, listening on port 61616 by default.
+
+Then, you can install the `karaf-jms-example-connectionfactory` feature:
+
+```
+karaf@root()> feature:install karaf-jms-example-connectionfactory
+```
+
+This feature is the "client" part: it uses the Karaf `jms` feature and related (like `pax-jms`) to create a `ConnectionFactory` service to the embedded ActiveMQ instance.
+
+Finally, the `karaf-jms-example-command` feature installs a shell commands bundle:
+
+```
+karaf@root()> feature:install karaf-jms-example-command
+```
+
+## Usage
+
+The `karaf-jms-example-command` feature installed a bundle providing `example:*` commands.
+
+You can use the `example:send` command to send a message to the ActiveMQ broker:
+
+```
+karaf@root()> example:send TEST FOO
+```
+
+where `TEST` is the JMS queue name and `FOO` the JMS message payload.
+
+Then, you can consume the latest message in a queue using `example:consume`:
+
+```
+karaf@root()> example:consume TEST
+```
\ No newline at end of file
diff --git a/examples/karaf-jms-example/karaf-jms-example-command/pom.xml b/examples/karaf-jms-example/karaf-jms-example-command/pom.xml
new file mode 100644
index 0000000000..6e97b962c6
--- /dev/null
+++ b/examples/karaf-jms-example/karaf-jms-example-command/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jms-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jms-example-command</artifactId>
+    <name>Apache Karaf :: Examples :: JMS :: Command</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jms_1.1_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.jms.command
+                        </Private-Package>
+                        <Import-Package>
+                            org.apache.karaf.shell*;version="[4,5)",
+                            javax.jms*;version="[1,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jms-example/karaf-jms-example-command/src/main/java/org/apache/karaf/examples/jms/command/ConsumeCommand.java b/examples/karaf-jms-example/karaf-jms-example-command/src/main/java/org/apache/karaf/examples/jms/command/ConsumeCommand.java
new file mode 100644
index 0000000000..12052d7c52
--- /dev/null
+++ b/examples/karaf-jms-example/karaf-jms-example-command/src/main/java/org/apache/karaf/examples/jms/command/ConsumeCommand.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed 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.karaf.examples.jms.command;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.MessageConsumer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+@Service
+@Command(scope = "example", name = "consume", description = "Consume a message from a JMS queue")
+public class ConsumeCommand implements Action {
+
+    @Argument(index = 0, name = "queue", description = "Name of the queue", required = true, multiValued = false)
+    String queue;
+
+    @Reference
+    ConnectionFactory connectionFactory;
+
+    @Override
+    public Object execute() throws Exception {
+        Connection connection = connectionFactory.createConnection();
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Destination destination = session.createQueue(queue);
+        MessageConsumer consumer = session.createConsumer(destination);
+        TextMessage message = (TextMessage) consumer.receive(60000);
+        if (message == null) {
+            throw new IllegalStateException("No message received");
+        } else {
+            System.out.println(message.getText());
+        }
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jms-example/karaf-jms-example-command/src/main/java/org/apache/karaf/examples/jms/command/SendCommand.java b/examples/karaf-jms-example/karaf-jms-example-command/src/main/java/org/apache/karaf/examples/jms/command/SendCommand.java
new file mode 100644
index 0000000000..d3e7318cf7
--- /dev/null
+++ b/examples/karaf-jms-example/karaf-jms-example-command/src/main/java/org/apache/karaf/examples/jms/command/SendCommand.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed 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.karaf.examples.jms.command;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+@Service
+@Command(scope = "example", name = "send", description = "Send a message to a JMS queue")
+public class SendCommand implements Action {
+
+    @Argument(index = 0, name = "queue", description = "Name of the queue", required = true, multiValued = false)
+    String queue;
+
+    @Argument(index = 1, name = "message", description = "Message payload to send", required = true, multiValued = false)
+    String message;
+
+    @Reference
+    ConnectionFactory connectionFactory;
+
+    @Override
+    public Object execute() throws Exception {
+        Connection connection = connectionFactory.createConnection();
+        connection.start();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Destination destination = session.createQueue(queue);
+        MessageProducer producer = session.createProducer(destination);
+        TextMessage textMessage = session.createTextMessage(message);
+        producer.send(textMessage);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jms-example/karaf-jms-example-features/pom.xml b/examples/karaf-jms-example/karaf-jms-example-features/pom.xml
new file mode 100644
index 0000000000..7482556b6c
--- /dev/null
+++ b/examples/karaf-jms-example/karaf-jms-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jms-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jms-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: JMS :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml b/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..cd165cd997
--- /dev/null
+++ b/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml
@@ -0,0 +1,52 @@
+<?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.
+-->
+<features name="karaf-jms-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <repository>mvn:org.apache.karaf.features/spring-legacy/${project.version}/xml/features</repository>
+    <repository>mvn:org.apache.activemq/activemq-karaf/[5.14,6)/xml/features</repository>
+
+    <feature name="karaf-jms-example-activemq" version="${project.version}">
+        <feature version="[4,5)">spring</feature>
+        <feature>aries-blueprint</feature>
+        <feature>shell-compat</feature>
+        <feature>activemq-broker</feature>
+    </feature>
+
+    <feature name="karaf-jms-example-connectionfactory" version="${project.version}">
+        <feature>activemq-client</feature>
+        <feature>jms</feature>
+        <feature>pax-jms-activemq</feature>
+        <config name="org.ops4j.connectionfactory-test">
+            name=test
+            osgi.jndi.service.name=jms/test
+            password=karaf
+            pool=transx
+            type=activemq
+            url=tcp://localhost:61616
+            user=karaf
+        </config>
+    </feature>
+
+    <feature name="karaf-jms-example-command" version="${project.version}">
+        <feature>karaf-jms-example-activemq</feature>
+        <feature>karaf-jms-example-connectionfactory</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jms-example-command/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-jms-example/pom.xml b/examples/karaf-jms-example/pom.xml
new file mode 100644
index 0000000000..7f2379ea4d
--- /dev/null
+++ b/examples/karaf-jms-example/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jms-example</artifactId>
+    <name>Apache Karaf :: Examples :: JMS</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-jms-example-command</module>
+        <module>karaf-jms-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/README.md b/examples/karaf-jpa-example/README.md
new file mode 100644
index 0000000000..6b98cd29fe
--- /dev/null
+++ b/examples/karaf-jpa-example/README.md
@@ -0,0 +1,110 @@
+<!--
+    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.
+-->
+# Apache Karaf JPA Example
+
+## Abstract
+
+This example shows how to use JPA with an entity. The entity manager is used in the persistence implementation.
+
+It implements a `BookingService` similar using a database for the storage, with a JPA entity.
+
+This example uses blueprint and declarative service to deal with JPA entity manager.
+
+The "command" bundle uses the `BookingService`.
+
+## Artifacts
+
+* **karaf-jpa-example-provider** module contain:
+    * **karaf-jpa-example-api** is a bundle providing the `Booking` entity used in the `BookingService`. As a best practice, this bundle should use a common bundle containing
+the `BookingService` interface, and then wrapping `Booking` POJO as a `JpaBooking` entity for instance. For convenience and reduce the number of
+example artifacts, we gather interface and implementation in the same bundle (again, it's bad).
+    * **karaf-jpa-example-provider-blueprint** contain bundles providing EclipseLink and Hibernate implementation using blueprint.
+    * **karaf-jpa-example-provider-ds** contain bundles providing EclipseLink and Hibernate implementation using declarative service.
+* **karaf-jpa-example-command** provides shell command to manipulate the `BookingService`. It use declarative service to retreive one instance of a `BookingService`. 
+If you want to use several service provider, you have to stop the actual service and install the new one.
+* **karaf-jpa-example-features** provides a Karaf features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Feature and Deployment
+
+On a running Karaf instance, register the features repository using:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-jpa-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the datasource feature:
+
+```
+karaf@root()> feature:install karaf-jpa-example-datasource
+```
+
+Then, you can install the service command feature (commands booking:xxx will not be available until you have installed 
+a provider):
+
+```
+karaf@root()> feature:install karaf-jpa-example-command
+```
+
+And install the service provider you want to use (for example EclipseLink using declarative service):
+
+```
+karaf@root()> feature:install karaf-jpa-example-provider-ds-eclipselink
+```
+
+## Usage
+
+Once you have installed the feature, you can see new commands available in the Apache Karaf shell.
+
+`booking:add` command adds a new booking in the booking service. For instance:
+
+```
+karaf@root()> booking:add Doe AF520
+```
+
+`booking:list` command lists the current bookings:
+
+```
+karaf@root()> booking:list
+ID      │ Flight │ Customer
+────────┼────────┼─────────
+1       │ AF520  │ Doe
+```
+
+`booking:get` command get the booking with id:
+
+```
+karaf@root()> booking:get 1
+ID      │ Flight │ Customer
+────────┼────────┼─────────
+1       │ AF520  │ Doe
+```
+
+`booking:remove` command removes a booking from the booking service:
+
+```
+karaf@root()> booking:remove 1
+```
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-command/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-command/pom.xml
new file mode 100644
index 0000000000..bf4465238e
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-command/pom.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jpa-example-command</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Command</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.jpa.command,
+                            org.apache.karaf.examples.jpa.completers
+                        </Private-Package>
+                        <Import-Package>
+                            org.apache.karaf.examples.jpa,
+                            org.apache.karaf.shell*;version="[4,5)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/AddCommand.java b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/AddCommand.java
new file mode 100644
index 0000000000..99805d8857
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/AddCommand.java
@@ -0,0 +1,45 @@
+/*
+ *  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.karaf.examples.jpa.command;
+
+import org.apache.karaf.examples.jpa.BookingService;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+@Service
+@Command(scope = "booking", name = "add", description = "Add a booking")
+public class AddCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Argument(index = 0, name = "customer", description = "Booking customer", required = true, multiValued = false)
+    String customer;
+
+    @Argument(index = 1, name = "flight", description = "Booking flight", required = true, multiValued = false)
+    String flight;
+
+    @Override
+    public Object execute() throws Exception {
+        bookingService.add(flight, customer);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/GetCommand.java b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/GetCommand.java
new file mode 100644
index 0000000000..5115e56b1b
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/GetCommand.java
@@ -0,0 +1,53 @@
+/*
+ *  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.karaf.examples.jpa.command;
+
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.apache.karaf.examples.jpa.completers.BookingIdCompleter;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.support.table.ShellTable;
+
+@Service
+@Command(scope = "booking", name = "get", description = "Get the booking by id")
+public class GetCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Argument(index = 0, name = "id", description = "Id of booking to retreive", required = true, multiValued = false)
+    @Completion(BookingIdCompleter.class)
+    Long id;
+
+    @Override
+    public Object execute() throws Exception {
+        ShellTable table = new ShellTable();
+        table.column("ID");
+        table.column("Flight");
+        table.column("Customer");
+        Booking booking = bookingService.get(id);
+        table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
+        table.print(System.out);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/ListCommand.java b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/ListCommand.java
new file mode 100644
index 0000000000..012e72083b
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/ListCommand.java
@@ -0,0 +1,47 @@
+/*
+ *  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.karaf.examples.jpa.command;
+
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.support.table.ShellTable;
+
+@Service
+@Command(scope = "booking", name = "list", description = "List the current bookings")
+public class ListCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Override
+    public Object execute() throws Exception {
+        ShellTable table = new ShellTable();
+        table.column("ID");
+        table.column("Flight");
+        table.column("Customer");
+        for (Booking booking : bookingService.list()) {
+            table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer());
+        }
+        table.print(System.out);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/RemoveCommand.java b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/RemoveCommand.java
new file mode 100644
index 0000000000..4a1cce6cc6
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/command/RemoveCommand.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.examples.jpa.command;
+
+import org.apache.karaf.examples.jpa.BookingService;
+import org.apache.karaf.examples.jpa.completers.BookingIdCompleter;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.util.List;
+
+@Service
+@Command(scope = "booking", name = "remove", description = "Remove an existing bookings")
+public class RemoveCommand implements Action {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Argument(index = 0, name = "ids", description = "List of bookings to remove", required = true, multiValued = true)
+    @Completion(BookingIdCompleter.class)
+    List<Long> ids;
+
+    @Override
+    public Object execute() throws Exception {
+        for (Long id : ids) {
+            bookingService.remove(id);
+        }
+        return null;
+    }
+
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/completers/BookingIdCompleter.java b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/completers/BookingIdCompleter.java
new file mode 100644
index 0000000000..8c1e4d2802
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-command/src/main/java/org/apache/karaf/examples/jpa/completers/BookingIdCompleter.java
@@ -0,0 +1,45 @@
+/*
+ *  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.karaf.examples.jpa.completers;
+
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.console.CommandLine;
+import org.apache.karaf.shell.api.console.Completer;
+import org.apache.karaf.shell.api.console.Session;
+import org.apache.karaf.shell.support.completers.StringsCompleter;
+
+import java.util.List;
+
+@Service
+public class BookingIdCompleter implements Completer {
+
+    @Reference
+    private BookingService bookingService;
+
+    @Override
+    public int complete(Session session, CommandLine commandLine, List<String> candidates) {
+        StringsCompleter delegate = new StringsCompleter();
+        for (Booking booking : bookingService.list()) {
+            delegate.getStrings().add(String.valueOf(booking.getId()));
+        }
+        return delegate.complete(session, commandLine, candidates);
+    }
+
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-features/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-features/pom.xml
new file mode 100644
index 0000000000..9a3a2faafb
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-features/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jpa-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Features</name>
+    <packaging>pom</packaging>
+
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml b/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..1b5afaa86d
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml
@@ -0,0 +1,85 @@
+<?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.
+-->
+<features name="karaf-jpa-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
+
+    <feature name="karaf-jpa-example-datasource" version="${project.version}">
+        <config name="org.ops4j.datasource-booking">
+            osgi.jdbc.driver.class=org.h2.Driver
+            databaseName=booking;create=true
+            dataSourceName=booking
+        </config>
+        <capability>
+            osgi.service;objectClass=javax.sql.DataSource;effective:=active;osgi.jndi.service.name=booking
+        </capability>
+    </feature>
+
+    <feature name="karaf-jpa-example-common" version="${project.version}">
+        <feature>transaction</feature>
+        <feature>jndi</feature>
+        <feature>pax-jdbc-config</feature>
+        <feature>pax-jdbc-h2</feature>
+        <feature>pax-jdbc-pool-dbcp2</feature>
+        <feature>jdbc</feature>
+        <feature dependency="true">aries-blueprint</feature>
+        <feature version="[2,3)">jpa</feature>
+        <feature version="[2,3)">eclipselink</feature>
+        <feature version="[5,6)">hibernate</feature>
+        <!--<feature version="[3,4)">openjpa3</feature>-->
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-api/${project.version}</bundle>
+    </feature>
+
+    <!-- Blueprint Providers -->
+    <feature name="karaf-jpa-example-provider-blueprint-hibernate" version="${project.version}">
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-blueprint-hibernate/${project.version}</bundle>
+    </feature>
+    <feature name="karaf-jpa-example-provider-blueprint-eclipselink" version="${project.version}">
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-blueprint-eclipselink/${project.version}</bundle>
+    </feature>
+    <!-- Waiting for javax.persistence 2.2 compatibility
+    <feature name="karaf-jpa-example-provider-blueprint-openjpa" version="${project.version}">
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-blueprint-openjpa/${project.version}</bundle>
+    </feature>-->
+
+    <!-- Declarative Service Providers -->
+    <feature name="karaf-jpa-example-provider-ds-hibernate" version="${project.version}">
+        <feature>scr</feature>
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-ds-hibernate/${project.version}</bundle>
+    </feature>
+    <feature name="karaf-jpa-example-provider-ds-eclipselink" version="${project.version}">
+        <feature>scr</feature>
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-ds-eclipselink/${project.version}</bundle>
+    </feature>
+    <!-- Waiting for javax.persistence 2.2 compatibility
+    <feature name="karaf-jpa-example-provider-ds-openjpa" version="${project.version}">
+        <feature>scr</feature>
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-provider-ds-openjpa/${project.version}</bundle>
+    </feature>-->
+
+    <feature name="karaf-jpa-example-command" version="${project.version}">
+        <feature version="${project.version}">karaf-jpa-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-jpa-example-command/${project.version}</bundle>
+    </feature>
+
+</features>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/pom.xml
new file mode 100644
index 0000000000..92f3ed3198
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-api</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: API</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.jpa</Export-Package>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            org.hibernate.proxy,
+                            javassist.util.proxy,
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/src/main/java/org/apache/karaf/examples/jpa/Booking.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/src/main/java/org/apache/karaf/examples/jpa/Booking.java
new file mode 100644
index 0000000000..21fd5df9c9
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/src/main/java/org/apache/karaf/examples/jpa/Booking.java
@@ -0,0 +1,59 @@
+/*
+ *  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.karaf.examples.jpa;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * A regular JPA entity, using JPA annotations.
+ */
+@Entity
+public class Booking {
+
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/src/main/java/org/apache/karaf/examples/jpa/BookingService.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/src/main/java/org/apache/karaf/examples/jpa/BookingService.java
new file mode 100644
index 0000000000..fd2a8aff01
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-api/src/main/java/org/apache/karaf/examples/jpa/BookingService.java
@@ -0,0 +1,36 @@
+/*
+ *  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.karaf.examples.jpa;
+
+import java.util.List;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    List<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+    void add(String flight, String customer);
+
+    void remove(Long id);
+
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/pom.xml
new file mode 100644
index 0000000000..536a0b95c1
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider-blueprint</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-blueprint-eclipselink</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Blueprint :: EclipseLink</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.interceptor</groupId>
+            <artifactId>javax.interceptor-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/eclipselink/BookingServiceImpl.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/eclipselink/BookingServiceImpl.java
new file mode 100644
index 0000000000..72393accaa
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/eclipselink/BookingServiceImpl.java
@@ -0,0 +1,84 @@
+/*
+ *  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.karaf.examples.jpa.provider.blueprint.eclipselink;
+
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.PersistenceContext;
+import javax.persistence.TypedQuery;
+import javax.transaction.Transactional;
+import java.util.List;
+
+/**
+ * Implementation of the booking service using the JPA entity manager service (provided by Karaf).
+ */
+@Transactional
+public class BookingServiceImpl implements BookingService {
+
+    @PersistenceContext(unitName = "booking-eclipselink")
+    private EntityManager entityManager;
+
+    public void setEntityManager(EntityManager entityManager) {
+        this.entityManager = entityManager;
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void add(Booking booking) {
+        entityManager.persist(booking);
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void add(String flight, String customer) {
+        Booking booking = new Booking();
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        entityManager.persist(booking);
+    }
+
+    @Transactional(Transactional.TxType.SUPPORTS)
+    @Override
+    public List<Booking> list() {
+        TypedQuery<Booking> query = entityManager.createQuery("SELECT b FROM Booking b", Booking.class);
+        return query.getResultList();
+    }
+
+    @Transactional(Transactional.TxType.SUPPORTS)
+    @Override
+    public Booking get(Long id) {
+        TypedQuery<Booking> query = entityManager.createQuery("SELECT b FROM Booking b WHERE b.id=:id", Booking.class);
+        query.setParameter("id", id);
+        Booking booking = null;
+        try {
+            booking = query.getSingleResult();
+        } catch (NoResultException e) {
+            // nothing to do
+        }
+        return booking;
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void remove(Long id) {
+        Booking booking = get(id);
+        entityManager.remove(booking);
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/resources/META-INF/persistence.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..4eb0686dd7
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_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.
+    -->
+
+    <persistence-unit name="booking-eclipselink" transaction-type="JTA">
+        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+
+        <!-- Only used when transaction-type=JTA -->
+        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</jta-data-source>
+
+        <!-- Only used when transaction-type=RESOURCE_LOCAL -->
+        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</non-jta-data-source>
+        <class>org.apache.karaf.examples.jpa.Booking</class>
+        <properties>
+            <property name="eclipselink.target-database" value="HSQL" />
+            <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+            <property name="eclipselink.ddl-generation.output-mode" value="database" />
+        </properties>
+    </persistence-unit>
+</persistence>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000000..da0dfcf398
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-eclipselink/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0"
+           xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.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.
+    -->
+
+    <jpa:enable />
+    <tx:enable-annotations />
+
+    <service ref="bookingService" interface="org.apache.karaf.examples.jpa.BookingService" />
+    <bean id="bookingService" class="org.apache.karaf.examples.jpa.provider.blueprint.eclipselink.BookingServiceImpl"/>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/pom.xml
new file mode 100644
index 0000000000..875892408d
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider-blueprint</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-blueprint-hibernate</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Blueprint :: Hibernate</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.interceptor</groupId>
+            <artifactId>javax.interceptor-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/hibernate/BookingServiceImpl.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/hibernate/BookingServiceImpl.java
new file mode 100644
index 0000000000..6c1f6b300e
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/hibernate/BookingServiceImpl.java
@@ -0,0 +1,84 @@
+/*
+ *  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.karaf.examples.jpa.provider.blueprint.hibernate;
+
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.PersistenceContext;
+import javax.persistence.TypedQuery;
+import javax.transaction.Transactional;
+import java.util.List;
+
+/**
+ * Implementation of the booking service using the JPA entity manager service (provided by Karaf).
+ */
+@Transactional
+public class BookingServiceImpl implements BookingService {
+
+    @PersistenceContext(unitName = "booking-hibernate")
+    private EntityManager entityManager;
+
+    public void setEntityManager(EntityManager entityManager) {
+        this.entityManager = entityManager;
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void add(Booking booking) {
+        entityManager.persist(booking);
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void add(String flight, String customer) {
+        Booking booking = new Booking();
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        entityManager.persist(booking);
+    }
+
+    @Transactional(Transactional.TxType.SUPPORTS)
+    @Override
+    public List<Booking> list() {
+        TypedQuery<Booking> query = entityManager.createQuery("SELECT b FROM Booking b", Booking.class);
+        return query.getResultList();
+    }
+
+    @Transactional(Transactional.TxType.SUPPORTS)
+    @Override
+    public Booking get(Long id) {
+        TypedQuery<Booking> query = entityManager.createQuery("SELECT b FROM Booking b WHERE b.id=:id", Booking.class);
+        query.setParameter("id", id);
+        Booking booking = null;
+        try {
+            booking = query.getSingleResult();
+        } catch (NoResultException e) {
+            // nothing to do
+        }
+        return booking;
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void remove(Long id) {
+        Booking booking = get(id);
+        entityManager.remove(booking);
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/resources/META-INF/persistence.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..71afd701d6
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_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.
+    -->
+
+    <persistence-unit name="booking-hibernate" transaction-type="JTA">
+        <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
+
+        <!-- Only used when transaction-type=JTA -->
+        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</jta-data-source>
+
+        <!-- Only used when transaction-type=RESOURCE_LOCAL -->
+        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</non-jta-data-source>
+        <class>org.apache.karaf.examples.jpa.Booking</class>
+        <properties>
+            <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
+            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+        </properties>
+    </persistence-unit>
+
+</persistence>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000000..d367dac2ad
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-hibernate/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0"
+           xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.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.
+    -->
+
+    <jpa:enable />
+    <tx:enable-annotations />
+
+    <service ref="bookingService" interface="org.apache.karaf.examples.jpa.BookingService" />
+    <bean id="bookingService" class="org.apache.karaf.examples.jpa.provider.blueprint.hibernate.BookingServiceImpl"/>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/pom.xml
new file mode 100644
index 0000000000..d77ebdb89d
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider-blueprint</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-blueprint-openjpa</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Blueprint :: OpenJPA</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.interceptor</groupId>
+            <artifactId>javax.interceptor-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/openjpa/BookingServiceImpl.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/openjpa/BookingServiceImpl.java
new file mode 100644
index 0000000000..e0e7a5c061
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/java/org/apache/karaf/examples/jpa/provider/blueprint/openjpa/BookingServiceImpl.java
@@ -0,0 +1,84 @@
+/*
+ *  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.karaf.examples.jpa.provider.blueprint.openjpa;
+
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.PersistenceContext;
+import javax.persistence.TypedQuery;
+import javax.transaction.Transactional;
+import java.util.List;
+
+/**
+ * Implementation of the booking service using the JPA entity manager service (provided by Karaf).
+ */
+@Transactional
+public class BookingServiceImpl implements BookingService {
+
+    @PersistenceContext(unitName = "booking-openjpa")
+    private EntityManager entityManager;
+
+    public void setEntityManager(EntityManager entityManager) {
+        this.entityManager = entityManager;
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void add(Booking booking) {
+        entityManager.persist(booking);
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void add(String flight, String customer) {
+        Booking booking = new Booking();
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        entityManager.persist(booking);
+    }
+
+    @Transactional(Transactional.TxType.SUPPORTS)
+    @Override
+    public List<Booking> list() {
+        TypedQuery<Booking> query = entityManager.createQuery("SELECT b FROM Booking b", Booking.class);
+        return query.getResultList();
+    }
+
+    @Transactional(Transactional.TxType.SUPPORTS)
+    @Override
+    public Booking get(Long id) {
+        TypedQuery<Booking> query = entityManager.createQuery("SELECT b FROM Booking b WHERE b.id=:id", Booking.class);
+        query.setParameter("id", id);
+        Booking booking = null;
+        try {
+            booking = query.getSingleResult();
+        } catch (NoResultException e) {
+            // nothing to do
+        }
+        return booking;
+    }
+
+    @Transactional(Transactional.TxType.REQUIRES_NEW)
+    @Override
+    public void remove(Long id) {
+        Booking booking = get(id);
+        entityManager.remove(booking);
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/resources/META-INF/persistence.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..b701c37390
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_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.
+    -->
+
+    <persistence-unit name="booking-openjpa" transaction-type="JTA">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+
+        <!-- Only used when transaction-type=JTA -->
+        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</jta-data-source>
+
+        <!-- Only used when transaction-type=RESOURCE_LOCAL -->
+        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</non-jta-data-source>
+        <class>org.apache.karaf.examples.jpa.Booking</class>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+
+</persistence>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000000..f41056ceae
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/karaf-jpa-example-provider-blueprint-openjpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0"
+           xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.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.
+    -->
+
+    <jpa:enable />
+    <tx:enable-annotations />
+
+    <service ref="bookingService" interface="org.apache.karaf.examples.jpa.BookingService" />
+    <bean id="bookingService" class="org.apache.karaf.examples.jpa.provider.blueprint.openjpa.BookingServiceImpl"/>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/pom.xml
new file mode 100644
index 0000000000..a967fbe311
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-blueprint/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-blueprint</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Blueprint</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-jpa-example-provider-blueprint-eclipselink</module>
+        <module>karaf-jpa-example-provider-blueprint-hibernate</module>
+        <module>karaf-jpa-example-provider-blueprint-openjpa</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/pom.xml
new file mode 100644
index 0000000000..db4355e974
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/pom.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider-ds</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-ds-eclipselink</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Declarative Service :: EclipseLink</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.interceptor</groupId>
+            <artifactId>javax.interceptor-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.jpa</groupId>
+            <artifactId>org.apache.aries.jpa.api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/src/main/java/org/apache/karaf/examples/jpa/provider/ds/eclipselink/BookingServiceImpl.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/src/main/java/org/apache/karaf/examples/jpa/provider/ds/eclipselink/BookingServiceImpl.java
new file mode 100644
index 0000000000..7f1882c7ba
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/src/main/java/org/apache/karaf/examples/jpa/provider/ds/eclipselink/BookingServiceImpl.java
@@ -0,0 +1,77 @@
+/*
+ *  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.karaf.examples.jpa.provider.ds.eclipselink;
+
+import org.apache.aries.jpa.template.JpaTemplate;
+import org.apache.aries.jpa.template.TransactionType;
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+import java.util.List;
+
+/**
+ * Implementation of the booking service using the JPA entity manager service (provided by Karaf).
+ */
+@Component(service = BookingService.class, immediate = true)
+public class BookingServiceImpl implements BookingService {
+
+    @Reference(target = "(osgi.unit.name=booking-eclipselink)")
+    private JpaTemplate jpaTemplate;
+
+    @Override
+    public void add(Booking booking) {
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            entityManager.persist(booking);
+            entityManager.flush();
+        });
+    }
+
+    @Override
+    public void add(String flight, String customer) {
+        Booking booking = new Booking();
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            entityManager.persist(booking);
+            entityManager.flush();
+        });
+    }
+
+    @Override
+    public List<Booking> list() {
+        return jpaTemplate.txExpr(TransactionType.Supports,
+                entityManager -> entityManager.createQuery("SELECT b FROM Booking b", Booking.class).getResultList());
+    }
+
+    @Override
+    public Booking get(Long id) {
+       return jpaTemplate.txExpr(TransactionType.Supports,
+               entityManager -> entityManager.find(Booking.class, id));
+    }
+
+    @Override
+    public void remove(Long id) {
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            Booking booking = entityManager.find(Booking.class, id);
+            if (booking !=  null) {
+                entityManager.remove(booking);
+            }
+        });
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/src/main/resources/META-INF/persistence.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..4eb0686dd7
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-eclipselink/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_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.
+    -->
+
+    <persistence-unit name="booking-eclipselink" transaction-type="JTA">
+        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+
+        <!-- Only used when transaction-type=JTA -->
+        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</jta-data-source>
+
+        <!-- Only used when transaction-type=RESOURCE_LOCAL -->
+        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</non-jta-data-source>
+        <class>org.apache.karaf.examples.jpa.Booking</class>
+        <properties>
+            <property name="eclipselink.target-database" value="HSQL" />
+            <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+            <property name="eclipselink.ddl-generation.output-mode" value="database" />
+        </properties>
+    </persistence-unit>
+</persistence>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/pom.xml
new file mode 100644
index 0000000000..c9abfacfd0
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/pom.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider-ds</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-ds-hibernate</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Declarative Service :: Hibernate</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.interceptor</groupId>
+            <artifactId>javax.interceptor-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.jpa</groupId>
+            <artifactId>org.apache.aries.jpa.api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/src/main/java/org/apache/karaf/examples/jpa/provider/ds/hibernate/BookingServiceImpl.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/src/main/java/org/apache/karaf/examples/jpa/provider/ds/hibernate/BookingServiceImpl.java
new file mode 100644
index 0000000000..f1be9b8f48
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/src/main/java/org/apache/karaf/examples/jpa/provider/ds/hibernate/BookingServiceImpl.java
@@ -0,0 +1,77 @@
+/*
+ *  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.karaf.examples.jpa.provider.ds.hibernate;
+
+import org.apache.aries.jpa.template.JpaTemplate;
+import org.apache.aries.jpa.template.TransactionType;
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+import java.util.List;
+
+/**
+ * Implementation of the booking service using the JPA entity manager service (provided by Karaf).
+ */
+@Component(service = BookingService.class, immediate = true)
+public class BookingServiceImpl implements BookingService {
+
+    @Reference(target = "(osgi.unit.name=booking-hibernate)")
+    private JpaTemplate jpaTemplate;
+
+    @Override
+    public void add(Booking booking) {
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            entityManager.persist(booking);
+            entityManager.flush();
+        });
+    }
+
+    @Override
+    public void add(String flight, String customer) {
+        Booking booking = new Booking();
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            entityManager.persist(booking);
+            entityManager.flush();
+        });
+    }
+
+    @Override
+    public List<Booking> list() {
+        return jpaTemplate.txExpr(TransactionType.Supports,
+                entityManager -> entityManager.createQuery("SELECT b FROM Booking b", Booking.class).getResultList());
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return jpaTemplate.txExpr(TransactionType.Supports,
+                entityManager -> entityManager.find(Booking.class, id));
+    }
+
+    @Override
+    public void remove(Long id) {
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            Booking booking = entityManager.find(Booking.class, id);
+            if (booking !=  null) {
+                entityManager.remove(booking);
+            }
+        });
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/src/main/resources/META-INF/persistence.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..71afd701d6
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-hibernate/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_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.
+    -->
+
+    <persistence-unit name="booking-hibernate" transaction-type="JTA">
+        <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
+
+        <!-- Only used when transaction-type=JTA -->
+        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</jta-data-source>
+
+        <!-- Only used when transaction-type=RESOURCE_LOCAL -->
+        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</non-jta-data-source>
+        <class>org.apache.karaf.examples.jpa.Booking</class>
+        <properties>
+            <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
+            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+        </properties>
+    </persistence-unit>
+
+</persistence>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/pom.xml
new file mode 100644
index 0000000000..a8fa8c3c62
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/pom.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider-ds</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-ds-openjpa</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Declarative Service :: OpenJPA</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>javax.transaction-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.interceptor</groupId>
+            <artifactId>javax.interceptor-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.jpa</groupId>
+            <artifactId>org.apache.aries.jpa.api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
+                        <Import-Package>
+                            javax.persistence;version="[2,3)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/src/main/java/org/apache/karaf/examples/jpa/provider/ds/openjpa/BookingServiceImpl.java b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/src/main/java/org/apache/karaf/examples/jpa/provider/ds/openjpa/BookingServiceImpl.java
new file mode 100644
index 0000000000..574c902030
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/src/main/java/org/apache/karaf/examples/jpa/provider/ds/openjpa/BookingServiceImpl.java
@@ -0,0 +1,81 @@
+/*
+ *  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.karaf.examples.jpa.provider.ds.openjpa;
+
+import org.apache.aries.jpa.template.JpaTemplate;
+import org.apache.aries.jpa.template.TransactionType;
+import org.apache.karaf.examples.jpa.Booking;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.TypedQuery;
+import javax.transaction.Transactional;
+import java.util.List;
+
+/**
+ * Implementation of the booking service using the JPA entity manager service (provided by Karaf).
+ */
+@Component(service = BookingService.class, immediate = true)
+public class BookingServiceImpl implements BookingService {
+
+    @Reference(target = "(osgi.unit.name=booking-openjpa)")
+    private JpaTemplate jpaTemplate;
+
+    @Override
+    public void add(Booking booking) {
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            entityManager.persist(booking);
+            entityManager.flush();
+        });
+    }
+
+    @Override
+    public void add(String flight, String customer) {
+        Booking booking = new Booking();
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            entityManager.persist(booking);
+            entityManager.flush();
+        });
+    }
+
+    @Override
+    public List<Booking> list() {
+        return jpaTemplate.txExpr(TransactionType.Supports,
+                entityManager -> entityManager.createQuery("SELECT b FROM Booking b", Booking.class).getResultList());
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return jpaTemplate.txExpr(TransactionType.Supports,
+                entityManager -> entityManager.find(Booking.class, id));
+    }
+
+    @Override
+    public void remove(Long id) {
+        jpaTemplate.tx(TransactionType.RequiresNew, entityManager -> {
+            Booking booking = entityManager.find(Booking.class, id);
+            if (booking !=  null) {
+                entityManager.remove(booking);
+            }
+        });
+    }
+}
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/src/main/resources/META-INF/persistence.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..b701c37390
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/karaf-jpa-example-provider-ds-openjpa/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_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.
+    -->
+
+    <persistence-unit name="booking-openjpa" transaction-type="JTA">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+
+        <!-- Only used when transaction-type=JTA -->
+        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</jta-data-source>
+
+        <!-- Only used when transaction-type=RESOURCE_LOCAL -->
+        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=booking)</non-jta-data-source>
+        <class>org.apache.karaf.examples.jpa.Booking</class>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+
+</persistence>
\ No newline at end of file
diff --git a/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/pom.xml
new file mode 100644
index 0000000000..102704c5a2
--- /dev/null
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/karaf-jpa-example-provider-ds/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example-provider</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>karaf-jpa-example-provider-ds</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider :: Declarative Service</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-jpa-example-provider-ds-eclipselink</module>
+        <module>karaf-jpa-example-provider-ds-hibernate</module>
+        <module>karaf-jpa-example-provider-ds-openjpa</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/demos/pom.xml b/examples/karaf-jpa-example/karaf-jpa-example-provider/pom.xml
similarity index 74%
rename from demos/pom.xml
rename to examples/karaf-jpa-example/karaf-jpa-example-provider/pom.xml
index b23f8212ad..c72a31719c 100644
--- a/demos/pom.xml
+++ b/examples/karaf-jpa-example/karaf-jpa-example-provider/pom.xml
@@ -10,7 +10,7 @@
         (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
+           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,
@@ -22,24 +22,20 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf</groupId>
-        <artifactId>karaf</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-jpa-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos</groupId>
-    <artifactId>demos</artifactId>
+    <artifactId>karaf-jpa-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: JPA :: Provider</name>
     <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos</name>
 
     <modules>
-        <module>web</module>
-        <module>branding</module>
-        <module>command</module>
-        <module>dump</module>
-        <module>deployer</module>
-        <module>profiles</module>
+        <module>karaf-jpa-example-provider-api</module>
+        <module>karaf-jpa-example-provider-ds</module>
+        <module>karaf-jpa-example-provider-blueprint</module>
     </modules>
 
 </project>
diff --git a/examples/karaf-jpa-example/pom.xml b/examples/karaf-jpa-example/pom.xml
new file mode 100644
index 0000000000..9c685849f8
--- /dev/null
+++ b/examples/karaf-jpa-example/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-jpa-example</artifactId>
+    <name>Apache Karaf :: Examples :: JPA</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-jpa-example-provider</module>
+        <module>karaf-jpa-example-command</module>
+        <module>karaf-jpa-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-log-appender-example/README.md b/examples/karaf-log-appender-example/README.md
new file mode 100644
index 0000000000..f8d4b5a4d6
--- /dev/null
+++ b/examples/karaf-log-appender-example/README.md
@@ -0,0 +1,63 @@
+<!--
+    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.
+-->
+# Apache Karaf Pax Logging Appender example
+
+## Abstract
+
+This example shows how to register a custom Pax Logging appender. It allows you to receive any log events happening
+internally in Karaf, and push the content wherever you want.
+As usual in Apache Karaf, all is dynamic, meaning that you can add or remove Pax Logging appender on the fly.
+
+## Artifacts
+
+* **karaf-log-appender-example-core** is a bundle registering a `PaxAppender` service. This service is simple: just display the log message in stdout.
+* **karaf-log-appender-example-features** contains Karaf features used for deployment
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, register the features repository:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-log-appender-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then you can install the log appender feature:
+
+```
+karaf@root()> feature:install karaf-log-appender-example
+```
+
+## Usage
+
+Once you have installed the `karaf-log-appender-example` feature, all log messages will be displayed in stdout (the Apache Karaf shell console).
+
+You can test this behavior by creating a log message using the `log:log` command:
+
+```
+karaf@root()> log:log Test
+INFO - Test
+```
\ No newline at end of file
diff --git a/demos/deployer/bundle/pom.xml b/examples/karaf-log-appender-example/karaf-log-appender-example-core/pom.xml
similarity index 64%
rename from demos/deployer/bundle/pom.xml
rename to examples/karaf-log-appender-example/karaf-log-appender-example-core/pom.xml
index 843bb96e7d..ee2caf28a1 100644
--- a/demos/deployer/bundle/pom.xml
+++ b/examples/karaf-log-appender-example/karaf-log-appender-example-core/pom.xml
@@ -10,7 +10,7 @@
         (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
+           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,
@@ -22,25 +22,25 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>org.apache.karaf.demos.deployer</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-log-appender-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos.deployer.bundle</groupId>
-    <artifactId>my-bundle</artifactId>
-    <version>4.2.1-SNAPSHOT</version>
+    <artifactId>karaf-log-appender-example-core</artifactId>
+    <name>Apache Karaf :: Examples :: Log Appender :: Core</name>
     <packaging>bundle</packaging>
 
-    <name>Apache Karaf :: Demos :: Deployer :: Bundle</name>
-    <description>Apache Karaf bundle demo.</description>
-
     <dependencies>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <scope>provided</scope>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
         </dependency>
     </dependencies>
 
@@ -49,16 +49,10 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Version>${project.version}</Bundle-Version>
-                        <Bundle-Activator>org.apache.karaf.demos.deployer.bundle.Activator</Bundle-Activator>
-                        <Export-Package>
-                            org.apache.karaf.demos.deployer.bundle*;version=${project.version}
-                        </Export-Package>
                         <Import-Package>
+                            org.ops4j.pax.logging*;version="[1.7,2)",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/examples/karaf-log-appender-example/karaf-log-appender-example-core/src/main/java/org/apache/karaf/examples/log/ExampleLogAppender.java b/examples/karaf-log-appender-example/karaf-log-appender-example-core/src/main/java/org/apache/karaf/examples/log/ExampleLogAppender.java
new file mode 100644
index 0000000000..a6db26906d
--- /dev/null
+++ b/examples/karaf-log-appender-example/karaf-log-appender-example-core/src/main/java/org/apache/karaf/examples/log/ExampleLogAppender.java
@@ -0,0 +1,36 @@
+/*
+ *  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.karaf.examples.log;
+
+import org.ops4j.pax.logging.spi.PaxAppender;
+import org.ops4j.pax.logging.spi.PaxLoggingEvent;
+import org.osgi.service.component.annotations.Component;
+
+@Component(
+        immediate = true,
+        property = {
+                "org.ops4j.pax.logging.appender.name=Example"
+        }
+)
+public class ExampleLogAppender implements PaxAppender {
+
+    @Override
+    public void doAppend(PaxLoggingEvent paxLoggingEvent) {
+        System.out.println(paxLoggingEvent.getLevel().toString() + " - " + paxLoggingEvent.getRenderedMessage());
+    }
+
+}
diff --git a/examples/karaf-log-appender-example/karaf-log-appender-example-features/pom.xml b/examples/karaf-log-appender-example/karaf-log-appender-example-features/pom.xml
new file mode 100644
index 0000000000..fa79153322
--- /dev/null
+++ b/examples/karaf-log-appender-example/karaf-log-appender-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-log-appender-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-log-appender-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: Log Appender :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-log-appender-example/karaf-log-appender-example-features/src/main/feature/feature.xml b/examples/karaf-log-appender-example/karaf-log-appender-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..d2abd51244
--- /dev/null
+++ b/examples/karaf-log-appender-example/karaf-log-appender-example-features/src/main/feature/feature.xml
@@ -0,0 +1,29 @@
+<?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.
+-->
+<features name="karaf-log-appender-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-log-appender-example" version="${project.version}">
+        <conditional>
+            <condition>log</condition>
+            <feature>scr</feature>
+            <bundle>mvn:org.apache.karaf.examples/karaf-log-appender-example-core/${project.version}</bundle>
+        </conditional>
+    </feature>
+
+</features>
diff --git a/examples/karaf-log-appender-example/pom.xml b/examples/karaf-log-appender-example/pom.xml
new file mode 100644
index 0000000000..6c88b74711
--- /dev/null
+++ b/examples/karaf-log-appender-example/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-log-appender-example</artifactId>
+    <name>Apache Karaf :: Examples :: Log Appender</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-log-appender-example-core</module>
+        <module>karaf-log-appender-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/README.md b/examples/karaf-maven-example/README.md
new file mode 100644
index 0000000000..1800de5551
--- /dev/null
+++ b/examples/karaf-maven-example/README.md
@@ -0,0 +1,109 @@
+<!--
+    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.
+-->
+# Apache Karaf Maven example
+
+## Abstract
+
+This example provides several Maven module showing usage of Karaf Maven plugin.
+
+Each module uses a specific goal of the Karaf Maven plugin, covering different use cases.
+
+## Maven Modules
+
+* **karaf-maven-example-run** uses the `karaf-maven-plugin:run` goal to download and start a Karaf instance.
+* **karaf-maven-example-run-bundle** uses the `karaf-maven-plugin:run` goal to download, start a Karaf instance and deploy the project bundle in this running instance.
+* **karaf-maven-example-deploy** uses the `karaf-maven-plugin:deploy` goal to deploy the module artifact into a Karaf instance (remote for example).
+* **karaf-maven-example-client** uses the `karaf-maven-plugin:client` goal to execute a shell command on a running Karaf instance.
+* **karaf-maven-example-kar** packages a features repository as a kar file, ready to be deployed.
+* **karaf-maven-example-assembly** uses the `karaf-maven-plugin` to create a Karaf distribution.
+
+## Goals Execution
+
+### Run
+
+The `karaf-maven-example-run` example downloads and starts a Apache Karaf container via Maven. By default, we just start and stop the instance (`<keepRunning>false</keepRunning>`),
+but you can leave the instance running using `<keepRunning>true</keepRunning>`.
+
+Simply do:
+
+```
+mvn clean install
+```
+
+### Run & Deploy
+
+The `karaf-maven-example-run-bundle` example is similar to the `karaf-maven-example-run` adding the deployment on the current project bundle in the running instance.
+
+The Karaf plugin is able to use the project artifact (jar, bundle, feature, whatever) when using `<deployProjectArtifact>true</deployProjectArtifact>`.
+It will automatically try to deploy the module artifact into the running Karaf instance.
+
+Simply do:
+
+```
+mvn clean install
+```
+
+### Deploy
+
+The `karaf-maven-example-deploy` example expects a Apache Karaf instance running locally on your machine. Then, it will automatically deploy the project artifact
+to this running instance (when `<useProjectArtifact/>` configuration is `true`, which is the default).
+
+By default, it uses SSH, but you can use JMX instead (using `<useSsh>false</useSsh>` configuration).
+
+It's also possible to deploy additional artifacts using `<artifactLocations/>` configuration.
+
+Simply do:
+
+```
+mvn clean install
+```
+
+### Client
+
+The `karaf-maven-example-client` example allows you to execute some shell commands on a running Karaf instance (using SSH) directly from Maven.
+
+It allows you to install features, change configuration or whatever, and get the output within Maven.
+
+It's possible to execute commands (specified with `<commands/>` configuration) and/or scripts (specified with `<scripts/>` configuration).
+
+Simply do:
+
+```
+mvn clean install
+```
+
+### KAR
+
+The `karaf-maven-example-kar` example shows how to create a KAR file containing project artifact.
+
+Simply do:
+
+```
+mvn clean install
+```
+
+### Assembly
+
+The `karaf-maven-example-assembly` example shows how to create your own Karaf distribution easily.
+
+Simply do:
+
+```
+mvn clean install
+```
\ No newline at end of file
diff --git a/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml b/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
new file mode 100644
index 0000000000..78c3e6ec9a
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-maven-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-maven-example-assembly</artifactId>
+    <name>Apache Karaf :: Examples :: Maven :: Assembly</name>
+    <packaging>karaf-assembly</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.features</groupId>
+            <artifactId>framework</artifactId>
+            <version>${project.version}</version>
+            <type>kar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.features</groupId>
+            <artifactId>standard</artifactId>
+            <version>${project.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <finalName>${project.artifactId}</finalName>
+                    <installedBundles>
+                        <installedBundle>mvn:commons-lang/commons-lang/2.6</installedBundle>
+                    </installedBundles>
+                    <bootFeatures>
+                        <feature>bundle</feature>
+                        <feature>config</feature>
+                        <feature>diagnostic</feature>
+                        <feature>feature</feature>
+                        <feature>jaas</feature>
+                        <feature>shell</feature>
+                        <feature>log</feature>
+                        <feature>management</feature>
+                        <feature>package</feature>
+                        <feature>shell-compat</feature>
+                        <feature>ssh</feature>
+                        <feature>system</feature>
+                        <feature>wrap</feature>
+                    </bootFeatures>
+                    <archiveZip>false</archiveZip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/karaf-maven-example-client/pom.xml b/examples/karaf-maven-example/karaf-maven-example-client/pom.xml
new file mode 100644
index 0000000000..bb16e0428f
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-client/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-maven-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-maven-example-client</artifactId>
+    <name>Apache Karaf :: Examples :: Maven :: Client</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>client</id>
+                        <goals>
+                            <goal>client</goal>
+                        </goals>
+                        <configuration>
+                            <host>localhost</host>
+                            <port>8101</port>
+                            <commands>
+                                <command>bundle:list -t 0</command>
+                            </commands>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/karaf-maven-example-deploy/pom.xml b/examples/karaf-maven-example/karaf-maven-example-deploy/pom.xml
new file mode 100644
index 0000000000..40885b7770
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-deploy/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-maven-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-maven-example-deploy</artifactId>
+    <name>Apache Karaf :: Examples :: Maven :: Deploy</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <inherited>true</inherited>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>org.apache.karaf.examples.maven.Activator</Bundle-Activator>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>deploy</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>deploy</goal>
+                        </goals>
+                        <configuration>
+                            <port>8101</port>
+                            <host>localhost</host>
+                            <instance>karaf-root</instance>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/karaf-maven-example-deploy/src/main/java/org/apache/karaf/examples/maven/Activator.java b/examples/karaf-maven-example/karaf-maven-example-deploy/src/main/java/org/apache/karaf/examples/maven/Activator.java
new file mode 100644
index 0000000000..126f0e8813
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-deploy/src/main/java/org/apache/karaf/examples/maven/Activator.java
@@ -0,0 +1,34 @@
+/*
+ *  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.karaf.examples.maven;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+    @Override
+    public void start(BundleContext bundleContext) {
+        System.out.println("Maven Run !!!!");
+    }
+
+    @Override
+    public void stop(BundleContext bundleContext) {
+        // nothing to do
+    }
+
+}
diff --git a/demos/deployer/kar/pom.xml b/examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
similarity index 68%
rename from demos/deployer/kar/pom.xml
rename to examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
index a9e6a7287b..36371ec57d 100644
--- a/demos/deployer/kar/pom.xml
+++ b/examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
@@ -10,7 +10,7 @@
         (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
+           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,
@@ -22,36 +22,31 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>org.apache.karaf.demos.deployer</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-maven-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos</groupId>
-    <artifactId>my-kar</artifactId>
-    <version>4.2.1-SNAPSHOT</version>
+    <artifactId>karaf-maven-example-kar</artifactId>
+    <name>Apache Karaf :: Examples :: Maven :: KAR</name>
     <packaging>pom</packaging>
-    <!-- You can directly use the kar packaging -->
-    <!-- <packaging>kar</packaging> -->
-    <name>Apache Karaf :: Demos :: Deployer :: Kar</name>
 
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.karaf.tooling</groupId>
                 <artifactId>karaf-maven-plugin</artifactId>
-                <!-- using the kar packaging, you just have to use plugin extensions -->
-                <!-- <extensions>true</extensions> -->
-                <!-- if you use the pom packaging, you have to explicitly define the plugin execution -->
+                <version>${project.version}</version>
                 <executions>
                     <execution>
-                        <id>package</id>
+                        <id>kar</id>
                         <goals>
                             <goal>kar</goal>
                         </goals>
                         <configuration>
-                            <featuresFile>${project.basedir}/src/main/feature/feature.xml</featuresFile>
+                            <!-- <classifier>my</classifier> -->
+                            <featuresFile>${basedir}/src/features/features-repo.xml</featuresFile>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/examples/karaf-maven-example/karaf-maven-example-kar/src/features/features-repo.xml b/examples/karaf-maven-example/karaf-maven-example-kar/src/features/features-repo.xml
new file mode 100644
index 0000000000..1236389bdc
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-kar/src/features/features-repo.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<features name="examples" xmlns="http://karaf.apache.org/xmlns/features/v1.4.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.
+    -->
+
+    <feature name="kar-example" version="1.0-SNAPSHOT">
+        <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
+    </feature>
+
+</features>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/karaf-maven-example-run-bundle/pom.xml b/examples/karaf-maven-example/karaf-maven-example-run-bundle/pom.xml
new file mode 100644
index 0000000000..ddd018f6a1
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-run-bundle/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-maven-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-maven-example-run-bundle</artifactId>
+    <name>Apache Karaf :: Examples :: Maven :: Run Bundle</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <inherited>true</inherited>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>org.apache.karaf.examples.maven.Activator</Bundle-Activator>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>run</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <karafDistribution>mvn:org.apache.karaf/apache-karaf/${project.version}/zip</karafDistribution>
+                            <keepRunning>false</keepRunning>
+                            <deployProjectArtifact>true</deployProjectArtifact>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/karaf-maven-example-run-bundle/src/main/java/org/apache/karaf/examples/maven/Activator.java b/examples/karaf-maven-example/karaf-maven-example-run-bundle/src/main/java/org/apache/karaf/examples/maven/Activator.java
new file mode 100644
index 0000000000..126f0e8813
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-run-bundle/src/main/java/org/apache/karaf/examples/maven/Activator.java
@@ -0,0 +1,34 @@
+/*
+ *  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.karaf.examples.maven;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+    @Override
+    public void start(BundleContext bundleContext) {
+        System.out.println("Maven Run !!!!");
+    }
+
+    @Override
+    public void stop(BundleContext bundleContext) {
+        // nothing to do
+    }
+
+}
diff --git a/examples/karaf-maven-example/karaf-maven-example-run/pom.xml b/examples/karaf-maven-example/karaf-maven-example-run/pom.xml
new file mode 100644
index 0000000000..73aefc7ea6
--- /dev/null
+++ b/examples/karaf-maven-example/karaf-maven-example-run/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-maven-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-maven-example-run</artifactId>
+    <name>Apache Karaf :: Examples :: Maven :: Run</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>run</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <karafDistribution>mvn:org.apache.karaf/apache-karaf/${project.version}/zip</karafDistribution>
+                            <keepRunning>false</keepRunning>
+                            <deployProjectArtifact>false</deployProjectArtifact>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-maven-example/pom.xml b/examples/karaf-maven-example/pom.xml
new file mode 100644
index 0000000000..339f1a74c1
--- /dev/null
+++ b/examples/karaf-maven-example/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-maven-example</artifactId>
+    <name>Apache Karaf :: Examples :: Maven</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-maven-example-run</module>
+        <module>karaf-maven-example-run-bundle</module>
+        <!-- The following examples requires a running Karaf instance -->
+        <!-- <module>karaf-maven-example-deploy</module> -->
+        <!-- <module>karaf-maven-example-client</module> -->
+        <!-- Avoid circular dep in Karaf build -->
+        <!-- <module>karaf-maven-example-kar</module> -->
+        <!-- <module>karaf-maven-example-assembly</module> -->
+    </modules>
+
+</project>
diff --git a/examples/karaf-mbean-example/README.md b/examples/karaf-mbean-example/README.md
new file mode 100644
index 0000000000..2b0bc2bb61
--- /dev/null
+++ b/examples/karaf-mbean-example/README.md
@@ -0,0 +1,79 @@
+<!--
+    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.
+-->
+# Apache Karaf MBean example
+
+## Abstract
+
+This example shows different ways to register a JMX MBean in the Apache Karaf MBeanServer.
+
+It exposes a MBean interacting with a `BookingService`.
+
+## Artifacts
+
+* **karaf-mbean-example-api** is a common bundle providing the `Booking` POJO and a `BookingService` interface.
+* **karaf-mbean-example-provider** is a very simple bundle providing a `BookingService` implementation.
+* **karaf-mbean-example-simple** is a bundle doing a MBean registration using the Karaf util
+* **karaf-mbean-example-blueprint** is a bundle doing a MBean registration using blueprint
+* **karaf-mbean-example-scr** is a bundle doing a MBean registration using SCR
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, register the features repository:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-mbean-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then you can install the service provider feature:
+
+```
+karaf@root()> feature:install karaf-mbean-example-provider
+```
+
+Then you can test the different registration approach:
+
+* To use the Karaf util registration, you install the `karaf-mbean-example-simple` feature:
+
+```
+karaf@root()> feature:install karaf-mbean-example-simple
+```
+
+* To use the blueprint registration, you install the `karaf-mbean-example-blueprint` feature:
+
+```
+karaf@root()> feature:install karaf-mbean-example-blueprint
+``` 
+
+* To use the SCR registration, you install the `karaf-mbean-example-scr` feature:
+
+```
+karaf@root()> feature:install karaf-mbean-example-scr
+```  
+
+## Usage
+
+Once you have installed a feature registering the MBean, you can see the MBean using any JMX client, like `jconsole`. 
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-api/pom.xml b/examples/karaf-mbean-example/karaf-mbean-example-api/pom.xml
new file mode 100644
index 0000000000..8a842dcf9a
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-api/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-mbean-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-mbean-example-api</artifactId>
+    <name>Apache Karaf :: Examples :: MBean :: API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.apache.karaf.examples.mbean.api
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-api/src/main/java/org/apache/karaf/examples/mbean/api/Booking.java b/examples/karaf-mbean-example/karaf-mbean-example-api/src/main/java/org/apache/karaf/examples/mbean/api/Booking.java
new file mode 100644
index 0000000000..041d6f118c
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-api/src/main/java/org/apache/karaf/examples/mbean/api/Booking.java
@@ -0,0 +1,52 @@
+/*
+ *  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.karaf.examples.mbean.api;
+
+/**
+ * A regular POJO.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-api/src/main/java/org/apache/karaf/examples/mbean/api/BookingService.java b/examples/karaf-mbean-example/karaf-mbean-example-api/src/main/java/org/apache/karaf/examples/mbean/api/BookingService.java
new file mode 100644
index 0000000000..7c6edbff5b
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-api/src/main/java/org/apache/karaf/examples/mbean/api/BookingService.java
@@ -0,0 +1,33 @@
+/*
+ *  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.karaf.examples.mbean.api;
+
+import java.util.Collection;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    Collection<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+    void remove(Long id);
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-blueprint/pom.xml b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/pom.xml
new file mode 100644
index 0000000000..5050699ed1
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-mbean-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-mbean-example-blueprint</artifactId>
+    <name>Apache Karaf :: Examples :: MBean :: Blueprint</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-mbean-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/java/org/apache/karaf/examples/mbean/blueprint/BookingMBean.java b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/java/org/apache/karaf/examples/mbean/blueprint/BookingMBean.java
new file mode 100644
index 0000000000..281f6fd6ba
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/java/org/apache/karaf/examples/mbean/blueprint/BookingMBean.java
@@ -0,0 +1,30 @@
+/*
+ *  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.karaf.examples.mbean.blueprint;
+
+import javax.management.MBeanException;
+import javax.management.openmbean.TabularData;
+
+public interface BookingMBean {
+
+    TabularData getBookings() throws MBeanException;
+
+    void add(long id, String flight, String customer) throws MBeanException;
+
+    void remove(long id) throws MBeanException;
+
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/java/org/apache/karaf/examples/mbean/blueprint/BookingMBeanImpl.java b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/java/org/apache/karaf/examples/mbean/blueprint/BookingMBeanImpl.java
new file mode 100644
index 0000000000..7b252cc97d
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/java/org/apache/karaf/examples/mbean/blueprint/BookingMBeanImpl.java
@@ -0,0 +1,77 @@
+/*
+ *  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.karaf.examples.mbean.blueprint;
+
+import org.apache.karaf.examples.mbean.api.Booking;
+import org.apache.karaf.examples.mbean.api.BookingService;
+
+import javax.management.MBeanException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.StandardMBean;
+import javax.management.openmbean.*;
+
+public class BookingMBeanImpl extends StandardMBean implements BookingMBean {
+
+    private BookingService bookingService;
+
+    public BookingMBeanImpl() throws NotCompliantMBeanException {
+        super(BookingMBean.class);
+    }
+
+    @Override
+    public TabularData getBookings() throws MBeanException {
+        try {
+            CompositeType bookingType = new CompositeType("booking", "Booking",
+                    new String[]{"id", "flight", "customer"},
+                    new String[]{"ID", "Flight", "Customer"},
+                    new OpenType[]{SimpleType.LONG, SimpleType.STRING, SimpleType.STRING});
+            TabularType tabularType = new TabularType("bookings", "Bookings", bookingType, new String[]{"id"});
+            TabularData tabularData = new TabularDataSupport(tabularType);
+            for (Booking booking : bookingService.list()) {
+                CompositeData compositeData = new CompositeDataSupport(bookingType,
+                        new String[]{ "id", "flight", "customer" },
+                        new Object[]{ booking.getId(), booking.getFlight(), booking.getCustomer() });
+                tabularData.put(compositeData);
+            }
+            return tabularData;
+        } catch (Exception e) {
+            throw new MBeanException(e);
+        }
+    }
+
+    @Override
+    public void add(long id, String flight, String customer) throws MBeanException {
+        Booking booking = new Booking();
+        booking.setId(id);
+        booking.setFlight(flight);
+        booking.setCustomer(customer);
+        bookingService.add(booking);
+    }
+
+    @Override
+    public void remove(long id) throws MBeanException {
+        bookingService.remove(id);
+    }
+
+    public BookingService getBookingService() {
+        return bookingService;
+    }
+
+    public void setBookingService(BookingService bookingService) {
+        this.bookingService = bookingService;
+    }
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/resources/OSGI-INF/blueprint/jmx.xml b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/resources/OSGI-INF/blueprint/jmx.xml
new file mode 100644
index 0000000000..91ab64d197
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-blueprint/src/main/resources/OSGI-INF/blueprint/jmx.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.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.
+    -->
+
+    <reference id="bookingService" interface="org.apache.karaf.examples.mbean.api.BookingService"/>
+
+    <service interface="org.apache.karaf.examples.mbean.blueprint.BookingMBean">
+        <service-properties>
+            <entry key="jmx.objectname" value="org.apache.karaf.examples:type=booking,name=default"/>
+        </service-properties>
+        <bean class="org.apache.karaf.examples.mbean.blueprint.BookingMBeanImpl">
+            <property name="bookingService" ref="bookingService"/>
+        </bean>
+    </service>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-features/pom.xml b/examples/karaf-mbean-example/karaf-mbean-example-features/pom.xml
new file mode 100644
index 0000000000..829ce910fc
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-mbean-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-mbean-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: MBean :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-features/src/main/feature/feature.xml b/examples/karaf-mbean-example/karaf-mbean-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..6c7eb8310b
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-features/src/main/feature/feature.xml
@@ -0,0 +1,47 @@
+<?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.
+-->
+<features name="karaf-mbean-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-mbean-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-mbean-example-api/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-mbean-example-provider" version="${project.version}">
+        <feature version="${project.version}">karaf-mbean-example-common</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-mbean-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-mbean-example-simple" version="${project.version}">
+        <feature version="${project.version}" prerequisite="true">karaf-mbean-example-provider</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-mbean-example-simple/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-mbean-example-blueprint" version="${project.version}">
+        <feature version="${project.version}" prerequisite="true">karaf-mbean-example-provider</feature>
+        <feature dependency="true">aries-blueprint</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-mbean-example-blueprint/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-mbean-example-scr" version="${project.version}">
+        <feature version="${project.version}" prerequisite="true">karaf-mbean-example-provider</feature>
+        <feature dependency="true">scr</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-mbean-example-scr/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-provider/pom.xml b/examples/karaf-mbean-example/karaf-mbean-example-provider/pom.xml
new file mode 100644
index 0000000000..253f69313f
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-provider/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-mbean-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-mbean-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: MBean :: Service Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-mbean-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>org.apache.karaf.util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.mbean.provider,
+                            org.apache.karaf.util.tracker,
+                            org.apache.karaf.util.tracker.annotation
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-provider/src/main/java/org/apache/karaf/examples/mbean/provider/Activator.java b/examples/karaf-mbean-example/karaf-mbean-example-provider/src/main/java/org/apache/karaf/examples/mbean/provider/Activator.java
new file mode 100644
index 0000000000..471d3cc9e9
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-provider/src/main/java/org/apache/karaf/examples/mbean/provider/Activator.java
@@ -0,0 +1,37 @@
+/*
+ *  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.karaf.examples.mbean.provider;
+
+import org.apache.karaf.examples.mbean.api.BookingService;
+import org.apache.karaf.util.tracker.BaseActivator;
+import org.apache.karaf.util.tracker.annotation.ProvideService;
+import org.apache.karaf.util.tracker.annotation.Services;
+
+@Services(
+        provides = {
+                @ProvideService(BookingService.class)
+        }
+)
+public class Activator extends BaseActivator {
+
+    @Override
+    public void doStart() {
+        BookingServiceMemoryImpl bookingService = new BookingServiceMemoryImpl();
+        register(BookingService.class, bookingService);
+    }
+
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-provider/src/main/java/org/apache/karaf/examples/mbean/provider/BookingServiceMemoryImpl.java b/examples/karaf-mbean-example/karaf-mbean-example-provider/src/main/java/org/apache/karaf/examples/mbean/provider/BookingServiceMemoryImpl.java
new file mode 100644
index 0000000000..e173cdbfff
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-provider/src/main/java/org/apache/karaf/examples/mbean/provider/BookingServiceMemoryImpl.java
@@ -0,0 +1,53 @@
+/*
+ *  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.karaf.examples.mbean.provider;
+
+import org.apache.karaf.examples.mbean.api.Booking;
+import org.apache.karaf.examples.mbean.api.BookingService;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Simple implementation of the {@link BookingService} storing the {@link Booking}
+ * instances in a list in memory.
+ */
+public class BookingServiceMemoryImpl implements BookingService {
+
+    private final Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    public Collection<Booking> list() {
+        return bookings.values();
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return bookings.get(id);
+    }
+
+    @Override
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+    @Override
+    public void remove(Long id) {
+        bookings.remove(id);
+    }
+}
diff --git a/demos/command/pom.xml b/examples/karaf-mbean-example/karaf-mbean-example-scr/pom.xml
similarity index 72%
rename from demos/command/pom.xml
rename to examples/karaf-mbean-example/karaf-mbean-example-scr/pom.xml
index 5fb8526ba2..ccdfbab825 100644
--- a/demos/command/pom.xml
+++ b/examples/karaf-mbean-example/karaf-mbean-example-scr/pom.xml
@@ -22,38 +22,31 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>demos</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-mbean-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>org.apache.karaf.demos.command</artifactId>
+    <artifactId>karaf-mbean-example-scr</artifactId>
+    <name>Apache Karaf :: Examples :: MBean :: SCR</name>
     <packaging>bundle</packaging>
-    <name>Apache Karaf :: Demos :: Command :: Extend Console</name>
 
     <dependencies>
-
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <scope>provided</scope>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-mbean-example-api</artifactId>
+            <version>${project.version}</version>
         </dependency>
-
         <dependency>
-            <groupId>org.apache.karaf.shell</groupId>
-            <artifactId>org.apache.karaf.shell.core</artifactId>
-            <scope>provided</scope>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
         </dependency>
-
     </dependencies>
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-services-maven-plugin</artifactId>
-            </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
@@ -61,4 +54,4 @@
         </plugins>
     </build>
 
-</project>
+</project>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-scr/src/main/java/org/apache/karaf/examples/mbean/scr/BookingMBean.java b/examples/karaf-mbean-example/karaf-mbean-example-scr/src/main/java/org/apache/karaf/examples/mbean/scr/BookingMBean.java
new file mode 100644
index 0000000000..5c172ad20b
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-scr/src/main/java/org/apache/karaf/examples/mbean/scr/BookingMBean.java
@@ -0,0 +1,30 @@
+/*
+ *  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.karaf.examples.mbean.scr;
+
+import javax.management.MBeanException;
+import javax.management.openmbean.TabularData;
+
+public interface BookingMBean {
+
+    TabularData getBookings() throws MBeanException;
+
+    void add(long id, String flight, String customer) throws MBeanException;
+
+    void remove(long id) throws MBeanException;
+
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-scr/src/main/java/org/apache/karaf/examples/mbean/scr/BookingMBeanImpl.java b/examples/karaf-mbean-example/karaf-mbean-example-scr/src/main/java/org/apache/karaf/examples/mbean/scr/BookingMBeanImpl.java
new file mode 100644
index 0000000000..dfbb22c234
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-scr/src/main/java/org/apache/karaf/examples/mbean/scr/BookingMBeanImpl.java
@@ -0,0 +1,83 @@
+/*
+ *  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.karaf.examples.mbean.scr;
+
+import org.apache.karaf.examples.mbean.api.Booking;
+import org.apache.karaf.examples.mbean.api.BookingService;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+import javax.management.MBeanException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.StandardMBean;
+import javax.management.openmbean.*;
+
+@Component(
+        property = "jmx.objectname=org.apache.karaf.examples:type=booking,name=default"
+)
+public class BookingMBeanImpl extends StandardMBean implements BookingMBean {
+
+    @Reference
+    private BookingService bookingService;
+
+    public BookingMBeanImpl() throws NotCompliantMBeanException {
+        super(BookingMBean.class);
+    }
+
+    @Override
+    public TabularData getBookings() throws MBeanException {
+        try {
+            CompositeType bookingType = new CompositeType("booking", "Booking",
+                    new String[]{"id", "flight", "customer"},
+                    new String[]{"ID", "Flight", "Customer"},
+                    new OpenType[]{SimpleType.LONG, SimpleType.STRING, SimpleType.STRING});
+            TabularType tabularType = new TabularType("bookings", "Bookings", bookingType, new String[]{"id"});
+            TabularData tabularData = new TabularDataSupport(tabularType);
+            for (Booking booking : bookingService.list()) {
+                CompositeData compositeData = new CompositeDataSupport(bookingType,
+                        new String[]{ "id", "flight", "customer" },
+                        new Object[]{ booking.getId(), booking.getFlight(), booking.getCustomer() });
+                tabularData.put(compositeData);
+            }
+            return tabularData;
+        } catch (Exception e) {
+            throw new MBeanException(e);
+        }
+    }
+
+    @Override
+    public void add(long id, String flight, String customer) throws MBeanException {
+        Booking booking = new Booking();
+        booking.setId(id);
+        booking.setFlight(flight);
+        booking.setCustomer(customer);
+        bookingService.add(booking);
+    }
+
+    @Override
+    public void remove(long id) throws MBeanException {
+        bookingService.remove(id);
+    }
+
+    public BookingService getBookingService() {
+        return bookingService;
+    }
+
+    public void setBookingService(BookingService bookingService) {
+        this.bookingService = bookingService;
+    }
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-simple/pom.xml b/examples/karaf-mbean-example/karaf-mbean-example-simple/pom.xml
new file mode 100644
index 0000000000..1f894eec70
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-simple/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-mbean-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-mbean-example-simple</artifactId>
+    <name>Apache Karaf :: Examples :: MBean :: Simple</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-mbean-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>org.apache.karaf.util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>
+                            org.apache.karaf.examples.mbean.api,
+                            *
+                        </Import-Package>
+                        <Private-Package>
+                            org.apache.karaf.examples.mbean.simple,
+                            org.apache.karaf.util,
+                            org.apache.karaf.util.tracker,
+                            org.apache.karaf.util.tracker.annotation
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/Activator.java b/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/Activator.java
new file mode 100644
index 0000000000..0fa3738e55
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/Activator.java
@@ -0,0 +1,47 @@
+/*
+ *  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.karaf.examples.mbean.simple;
+
+import org.apache.karaf.examples.mbean.api.BookingService;
+import org.apache.karaf.util.tracker.BaseActivator;
+import org.apache.karaf.util.tracker.annotation.ProvideService;
+import org.apache.karaf.util.tracker.annotation.RequireService;
+import org.apache.karaf.util.tracker.annotation.Services;
+
+@Services(
+        provides = {
+                @ProvideService(BookingMBean.class)
+        },
+        requires = {
+                @RequireService(BookingService.class)
+        }
+)
+public class Activator extends BaseActivator {
+
+    @Override
+    public void doStart() throws Exception {
+        BookingService bookingService = getTrackedService(BookingService.class);
+        if (bookingService == null) {
+            return;
+        }
+
+        BookingMBeanImpl bookingMBean = new BookingMBeanImpl();
+        bookingMBean.setBookingService(bookingService);
+
+        registerMBeanWithName(bookingMBean, "org.apache.karaf.examples:type=booking,name=default");
+    }
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/BookingMBean.java b/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/BookingMBean.java
new file mode 100644
index 0000000000..a758d3aa60
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/BookingMBean.java
@@ -0,0 +1,30 @@
+/*
+ *  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.karaf.examples.mbean.simple;
+
+import javax.management.MBeanException;
+import javax.management.openmbean.TabularData;
+
+public interface BookingMBean {
+
+    TabularData getBookings() throws MBeanException;
+
+    void add(long id, String flight, String customer) throws MBeanException;
+
+    void remove(long id) throws MBeanException;
+
+}
diff --git a/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/BookingMBeanImpl.java b/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/BookingMBeanImpl.java
new file mode 100644
index 0000000000..866f75e943
--- /dev/null
+++ b/examples/karaf-mbean-example/karaf-mbean-example-simple/src/main/java/org/apache/karaf/examples/mbean/simple/BookingMBeanImpl.java
@@ -0,0 +1,77 @@
+/*
+ *  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.karaf.examples.mbean.simple;
+
+import org.apache.karaf.examples.mbean.api.Booking;
+import org.apache.karaf.examples.mbean.api.BookingService;
+
+import javax.management.MBeanException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.StandardMBean;
+import javax.management.openmbean.*;
+
+public class BookingMBeanImpl extends StandardMBean implements BookingMBean {
+
+    private BookingService bookingService;
+
+    public BookingMBeanImpl() throws NotCompliantMBeanException {
+        super(BookingMBean.class);
+    }
+
+    @Override
+    public TabularData getBookings() throws MBeanException {
+        try {
+            CompositeType bookingType = new CompositeType("booking", "Booking",
+                    new String[]{"id", "flight", "customer"},
+                    new String[]{"ID", "Flight", "Customer"},
+                    new OpenType[]{SimpleType.LONG, SimpleType.STRING, SimpleType.STRING});
+            TabularType tabularType = new TabularType("bookings", "Bookings", bookingType, new String[]{"id"});
+            TabularData tabularData = new TabularDataSupport(tabularType);
+            for (Booking booking : bookingService.list()) {
+                CompositeData compositeData = new CompositeDataSupport(bookingType,
+                        new String[]{ "id", "flight", "customer" },
+                        new Object[]{ booking.getId(), booking.getFlight(), booking.getCustomer() });
+                tabularData.put(compositeData);
+            }
+            return tabularData;
+        } catch (Exception e) {
+            throw new MBeanException(e);
+        }
+    }
+
+    @Override
+    public void add(long id, String flight, String customer) throws MBeanException {
+        Booking booking = new Booking();
+        booking.setId(id);
+        booking.setFlight(flight);
+        booking.setCustomer(customer);
+        bookingService.add(booking);
+    }
+
+    @Override
+    public void remove(long id) throws MBeanException {
+        bookingService.remove(id);
+    }
+
+    public BookingService getBookingService() {
+        return bookingService;
+    }
+
+    public void setBookingService(BookingService bookingService) {
+        this.bookingService = bookingService;
+    }
+}
diff --git a/examples/karaf-mbean-example/pom.xml b/examples/karaf-mbean-example/pom.xml
new file mode 100644
index 0000000000..265e04ff02
--- /dev/null
+++ b/examples/karaf-mbean-example/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-mbean-example</artifactId>
+    <name>Apache Karaf :: Examples :: MBean</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-mbean-example-api</module>
+        <module>karaf-mbean-example-provider</module>
+        <module>karaf-mbean-example-simple</module>
+        <module>karaf-mbean-example-blueprint</module>
+        <module>karaf-mbean-example-scr</module>
+        <module>karaf-mbean-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-profile-example/README.md b/examples/karaf-profile-example/README.md
new file mode 100644
index 0000000000..b839dd8b77
--- /dev/null
+++ b/examples/karaf-profile-example/README.md
@@ -0,0 +1,92 @@
+<!--
+    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.
+-->
+# Apache Karaf Profile example
+
+## Abstract
+
+This example shows you how to create several profiles (in a registry) and use these profiles to create custom distributions.
+
+## Artifacts
+
+* **karaf-profile-example-registry** is a main container for profiles (registry).
+* **karaf-profile-example-dynamic** is a custom Karaf distribution where we apply profiles "on the fly".
+* **karaf-profile-example-static** is a custom Karaf distribution "static", for instance, very convenient to run on Docker.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Registry
+
+The `karaf-profile-example-registry` module contains several profiles (with inheritance). A profile is described with a `profile.cfg` and contains
+resources used in the Karaf container (cfg file, bundles, features, ...).
+
+You can build the registry simply using:
+
+```
+mvn clean install
+```
+
+## Assembly & Distributions
+
+### Dynamic
+
+The `karaf-profile-example-dynamic` module uses the profile registry (using `<profileUri/>`) to create an assembly applying profiles as boot profiles:
+
+* `karaf`
+* `example-loanbroker-bank1`
+* `example-loanbroker-bank2`
+* `example-loanbroker-bank3`
+* `example-loanbroker-broker`
+* `activemq-broker`
+
+To build the distribution, simply do:
+
+```
+mvn clean install
+```
+
+You can find the resulting distribution in the `target` folder: `karaf-profile-example-dynamic*.tar.gz`.
+
+### Static
+
+The `karaf-profile-example-static` module uses also the profiles to create a distribution using the same profiles, however, it uses a static approach. It's especially
+designed to run a docker or a simple JVM without dynamic change of configuration.
+
+The build the distribution, simply do:
+
+```
+mvn clean install
+```
+
+You can find the resulting distribution in the `target` folder: `karaf-profile-example-static-4.2.1-SNAPSHOT.tar.gz`.
+
+### Profile & shell
+
+On a running Karaf instance, you can install the `profile` feature using:
+
+```
+karaf@root()> feature:install profile
+```
+
+Then, you have new commands available in the shell, allowing you to create, edit, apply profiles.
\ No newline at end of file
diff --git a/demos/profiles/dynamic/pom.xml b/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
similarity index 94%
rename from demos/profiles/dynamic/pom.xml
rename to examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
index 7116b3caf5..0b7579db81 100644
--- a/demos/profiles/dynamic/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
@@ -22,15 +22,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf</groupId>
-        <artifactId>karaf</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-profile-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
-        <relativePath>../../../pom.xml</relativePath>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos.profiles</groupId>
-    <artifactId>dynamic</artifactId>
-    <name>Apache Karaf :: Demos :: Profiles :: Dynamic Assembly</name>
+    <artifactId>karaf-profile-example-dynamic</artifactId>
+    <name>Apache Karaf :: Examples :: Profile :: Dynamic Assembly</name>
 
     <dependencies>
         <dependency>
diff --git a/demos/profiles/registry/pom.xml b/examples/karaf-profile-example/karaf-profile-example-registry/pom.xml
similarity index 86%
rename from demos/profiles/registry/pom.xml
rename to examples/karaf-profile-example/karaf-profile-example-registry/pom.xml
index 98f9ea620f..260461db84 100644
--- a/demos/profiles/registry/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-registry/pom.xml
@@ -22,15 +22,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf</groupId>
-        <artifactId>karaf</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-profile-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
-        <relativePath>../../../pom.xml</relativePath>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos.profiles</groupId>
-    <artifactId>registry</artifactId>
-    <name>Apache Karaf :: Demos :: Profiles :: Registry</name>
+    <artifactId>karaf-profile-example-registry</artifactId>
+    <name>Apache Karaf :: Examples :: Profile :: Registry</name>
 
     <properties>
         <activemq.version>5.14.3</activemq.version>
@@ -38,7 +37,6 @@
         <cxf.version>3.1.9</cxf.version>
     </properties>
 
-
     <build>
         <resources>
             <resource>
@@ -58,4 +56,4 @@
         </resources>
     </build>
 
-</project>
+</project>
\ No newline at end of file
diff --git a/demos/profiles/registry/src/main/resources/activemq/broker.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/activemq/broker.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/activemq/broker.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/activemq/broker.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/activemq/client.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/activemq/client.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/activemq/client.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/activemq/client.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/camel.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/camel.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/camel.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/camel.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/default.profile/jetty.xml b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/jetty.xml
similarity index 100%
rename from demos/profiles/registry/src/main/resources/default.profile/jetty.xml
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/jetty.xml
diff --git a/demos/profiles/registry/src/main/resources/default.profile/org.ops4j.pax.web.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/org.ops4j.pax.web.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/default.profile/org.ops4j.pax.web.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/org.ops4j.pax.web.cfg
diff --git a/demos/profiles/registry/src/main/resources/default.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/default.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/default.profile/version.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/version.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/default.profile/version.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/default.profile/version.cfg
diff --git a/demos/profiles/registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg
diff --git a/demos/profiles/registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg#static b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg#static
similarity index 100%
rename from demos/profiles/registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg#static
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/karaf.profile/org.ops4j.pax.logging.cfg#static
diff --git a/demos/profiles/registry/src/main/resources/karaf.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/karaf.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/karaf.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/karaf.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/bank1.profile/bank1.xml b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank1.profile/bank1.xml
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/bank1.profile/bank1.xml
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank1.profile/bank1.xml
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/bank1.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank1.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/bank1.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank1.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/bank2.profile/bank2.xml b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank2.profile/bank2.xml
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/bank2.profile/bank2.xml
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank2.profile/bank2.xml
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/bank2.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank2.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/bank2.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank2.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/bank3.profile/bank3.xml b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank3.profile/bank3.xml
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/bank3.profile/bank3.xml
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank3.profile/bank3.xml
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/bank3.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank3.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/bank3.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/bank3.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/base.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/base.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/base.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/base.profile/profile.cfg
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/broker.profile/loanBroker.xml b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/broker.profile/loanBroker.xml
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/broker.profile/loanBroker.xml
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/broker.profile/loanBroker.xml
diff --git a/demos/profiles/registry/src/main/resources/example/loanbroker/broker.profile/profile.cfg b/examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/broker.profile/profile.cfg
similarity index 100%
rename from demos/profiles/registry/src/main/resources/example/loanbroker/broker.profile/profile.cfg
rename to examples/karaf-profile-example/karaf-profile-example-registry/src/main/resources/loanbroker/broker.profile/profile.cfg
diff --git a/demos/profiles/static/pom.xml b/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
similarity index 94%
rename from demos/profiles/static/pom.xml
rename to examples/karaf-profile-example/karaf-profile-example-static/pom.xml
index a74fedc912..4b8826931f 100644
--- a/demos/profiles/static/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
@@ -22,16 +22,15 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>demos</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-profile-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos.profiles</groupId>
-    <artifactId>static</artifactId>
+    <artifactId>karaf-profile-example-static</artifactId>
     <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos :: Profiles :: Static Assembly</name>
+    <name>Apache Karaf :: Examples :: Profile :: Static Assembly</name>
 
     <dependencies>
         <dependency>
diff --git a/demos/deployer/pom.xml b/examples/karaf-profile-example/pom.xml
similarity index 77%
rename from demos/deployer/pom.xml
rename to examples/karaf-profile-example/pom.xml
index 43b3c8fdfb..e54514f279 100644
--- a/demos/deployer/pom.xml
+++ b/examples/karaf-profile-example/pom.xml
@@ -22,18 +22,20 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf.demos</groupId>
-        <artifactId>demos</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
         <version>4.2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>org.apache.karaf.demos.deployer</artifactId>
+    <artifactId>karaf-profile-example</artifactId>
+    <name>Apache Karaf :: Examples :: Profile</name>
     <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos :: Deployer</name>
 
     <modules>
-        <module>kar</module>
-        <module>bundle</module>
+        <module>karaf-profile-example-registry</module>
+        <module>karaf-profile-example-dynamic</module>
+        <module>karaf-profile-example-static</module>
     </modules>
-</project>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-rest-example/README.md b/examples/karaf-rest-example/README.md
new file mode 100644
index 0000000000..6c78de249f
--- /dev/null
+++ b/examples/karaf-rest-example/README.md
@@ -0,0 +1,86 @@
+<!--
+    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.
+-->
+# Apache Karaf REST Example
+
+## Abstract
+
+This example shows how to use JAX-RS to implement a REST service.
+
+This example uses blueprint to deal with the jaxrs-server and Apache CXF as the implementation of the JAXRS specification.
+
+It implements a `BookingService` with a REST implementation. 
+
+The "client" bundle uses the `BookingService` with a REST client stub.
+
+## Artifacts
+
+* **karaf-rest-example-api** is a common bundle containing the `Booking` POJO and the `BookingService` interface.   
+* **karaf-rest-example-provider** is a blueprint bundle providing the `BookingServiceRest` implementation of the `BookingService` interface.
+* **karaf-rest-example-client** is a regular Blueprint bundle using the `BookingService`.
+* **karaf-rest-example-client-http** is a regular Blueprint REST client bundle using Java Http.
+* **karaf-rest-example-client-cxf** is a regular Blueprint REST client bundle using Apache CXF.
+* **karaf-rest-example-features** provides a Karaf features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Feature and Deployment
+
+On a running Karaf instance, register the features repository using:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-rest-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the service provider feature:
+
+```
+karaf@root()> feature:install karaf-rest-example-provider
+```
+
+And the service client feature using Java Http:
+
+```
+karaf@root()> feature:install karaf-rest-example-client-http
+```
+
+The `karaf-rest-example-client-http` feature provides `booking:*` commands you can use to call the REST service.
+
+And the service client feature using Apache CXF:
+
+```
+karaf@root()> feature:install karaf-rest-example-client-cxf
+```
+
+The `karaf-rest-example-client-cxf` feature provides `booking:*` commands you can use to call the REST service.
+
+## Usage
+
+Once you have install a client feature, you can use `booking:add` and `booking:list` commands to interact with the REST
+service.
+
+----
+karaf@root()> booking:add 1 "John Doe" AF520
+karaf@root()> booking:list
+----
\ No newline at end of file
diff --git a/examples/karaf-rest-example/karaf-rest-example-api/pom.xml b/examples/karaf-rest-example/karaf-rest-example-api/pom.xml
new file mode 100644
index 0000000000..d39d0fdd4b
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-api/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-rest-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-rest-example-api</artifactId>
+    <name>Apache Karaf :: Examples :: REST :: API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.rest.api</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-rest-example/karaf-rest-example-api/src/main/java/org/apache/karaf/examples/rest/api/Booking.java b/examples/karaf-rest-example/karaf-rest-example-api/src/main/java/org/apache/karaf/examples/rest/api/Booking.java
new file mode 100644
index 0000000000..adf493e05c
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-api/src/main/java/org/apache/karaf/examples/rest/api/Booking.java
@@ -0,0 +1,51 @@
+/*
+ *  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.karaf.examples.rest.api;
+
+/**
+ * A regular POJO.
+ */
+public class Booking {
+
+    private Long id;
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-rest-example/karaf-rest-example-api/src/main/java/org/apache/karaf/examples/rest/api/BookingService.java b/examples/karaf-rest-example/karaf-rest-example-api/src/main/java/org/apache/karaf/examples/rest/api/BookingService.java
new file mode 100644
index 0000000000..0e46630140
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-api/src/main/java/org/apache/karaf/examples/rest/api/BookingService.java
@@ -0,0 +1,35 @@
+/*
+ *  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.karaf.examples.rest.api;
+
+import java.util.Collection;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    Collection<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+    
+    void update(Booking booking);
+    
+    void remove(Long id);
+}
diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml
new file mode 100644
index 0000000000..291fa00a38
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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. -->
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.karaf.examples</groupId>
+		<artifactId>karaf-rest-example-client</artifactId>
+		<version>4.2.1-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+
+	<artifactId>karaf-rest-example-client-cxf</artifactId>
+	<name>Apache Karaf :: Examples :: REST :: Client :: Apache CXF</name>
+	<packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.ws.rs</groupId>
+			<artifactId>javax.ws.rs-api</artifactId>
+			<version>2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.karaf.examples</groupId>
+			<artifactId>karaf-rest-example-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-rs-client</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.jaxrs</groupId>
+			<artifactId>jackson-jaxrs-json-provider</artifactId>
+			<version>[2.9,3)</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.karaf.shell</groupId>
+			<artifactId>org.apache.karaf.shell.core</artifactId>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.karaf.tooling</groupId>
+				<artifactId>karaf-services-maven-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+						<Import-Package>
+							org.apache.karaf.shell*;version="[4,5)",
+							*
+						</Import-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/src/main/java/org/apache/karaf/examples/rest/client/cxf/AddBookingCommand.java b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/src/main/java/org/apache/karaf/examples/rest/client/cxf/AddBookingCommand.java
new file mode 100644
index 0000000000..e52b98367a
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/src/main/java/org/apache/karaf/examples/rest/client/cxf/AddBookingCommand.java
@@ -0,0 +1,68 @@
+/*
+ *  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.karaf.examples.rest.client.cxf;
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.karaf.examples.rest.api.Booking;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import javax.ws.rs.core.MediaType;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+@Command(scope = "booking", name = "add", description = "Add booking")
+public class AddBookingCommand implements Action {
+
+    @Argument(index = 0, name = "id", description = "Booking ID", required = true, multiValued = false)
+    long id;
+
+    @Argument(index = 1, name = "customer", description = "Customer name", required = true, multiValued = false)
+    String customer;
+
+    @Argument(index = 2, name = "flight", description = "Flight number", required = true, multiValued = false)
+    String flight;
+
+    @Option(name = "--url", description = "Location of the REST service", required = false, multiValued = false)
+    String restLocation = "http://localhost:8181/cxf/booking/";
+
+    @Override
+    public Object execute() throws Exception {
+        Booking booking = new Booking();
+        booking.setId(id);
+        booking.setFlight(flight);
+        booking.setCustomer(customer);
+
+        List providers = new ArrayList();
+        providers.add(new JacksonJsonProvider());
+        WebClient webClient = WebClient.create(restLocation, providers);
+        webClient.header("Content-Type", MediaType.APPLICATION_JSON).post(booking);
+
+        return null;
+    }
+
+}
diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/src/main/java/org/apache/karaf/examples/rest/client/cxf/ListBookingCommand.java b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/src/main/java/org/apache/karaf/examples/rest/client/cxf/ListBookingCommand.java
new file mode 100644
index 0000000000..aa45b0809d
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/src/main/java/org/apache/karaf/examples/rest/client/cxf/ListBookingCommand.java
@@ -0,0 +1,52 @@
+/*
+ *  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.karaf.examples.rest.client.cxf;
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.karaf.examples.rest.api.Booking;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import javax.ws.rs.core.MediaType;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+@Command(scope = "booking", name = "list", description = "List booking")
+public class ListBookingCommand implements Action {
+
+    @Option(name = "--url", description = "Location of the REST service", required = false, multiValued = false)
+    String restLocation = "http://localhost:8181/cxf/booking/";
+
+    @Override
+    public Object execute() throws Exception {
+        List providers = new ArrayList();
+        providers.add(new JacksonJsonProvider());
+        WebClient webClient = WebClient.create(restLocation, providers);
+
+        List<Booking> bookings = (List<Booking>) webClient.accept(MediaType.APPLICATION_JSON).getCollection(Booking.class);
+        for (Booking booking : bookings) {
+            System.out.println(booking.getId() + " " + booking.getCustomer() + " " + booking.getFlight());
+        }
+
+        return null;
+    }
+
+}
diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/pom.xml b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/pom.xml
new file mode 100644
index 0000000000..8849cba23b
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/pom.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-rest-example-client</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-rest-example-client-http</artifactId>
+    <name>Apache Karaf :: Examples :: REST :: Client :: Java HTTP</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.rest.client.http
+                        </Private-Package>
+                        <Import-Package>
+                            org.apache.karaf.shell*;version="[4,5)",
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/src/main/java/org/apache/karaf/examples/rest/client/http/AddBookingCommand.java b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/src/main/java/org/apache/karaf/examples/rest/client/http/AddBookingCommand.java
new file mode 100644
index 0000000000..778f39cc1d
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/src/main/java/org/apache/karaf/examples/rest/client/http/AddBookingCommand.java
@@ -0,0 +1,79 @@
+/*
+ *  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.karaf.examples.rest.client.http;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.Buffer;
+
+@Service
+@Command(scope = "booking", name = "add", description = "Add booking")
+public class AddBookingCommand implements Action {
+
+    @Argument(index = 0, name = "id", description = "Booking ID", required = true, multiValued = false)
+    long id;
+
+    @Argument(index = 1, name = "customer", description = "Customer name", required = true, multiValued = false)
+    String customer;
+
+    @Argument(index = 2, name = "flight", description = "Flight number", required = true, multiValued = false)
+    String flight;
+
+    @Option(name = "--url", description = "Location of the REST service", required = false, multiValued = false)
+    String restLocation = "http://localhost:8181/cxf/booking/";
+
+    @Override
+    public Object execute() throws Exception {
+        URL url = new URL(restLocation);
+
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setRequestMethod("POST");
+        connection.setRequestProperty("Content-Type", "application/json");
+        connection.setDoOutput(true);
+        connection.setDoInput(true);
+
+        String json = "{"
+                + "\"id\": " + id + ","
+                + "\"flight\": \"" + flight + "\","
+                + "\"customer\": \"" + customer + "\""
+                + "}";
+
+        OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
+        writer.write(json);
+        writer.close();
+
+        BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            System.out.println(line);
+        }
+        reader.close();
+
+        return null;
+    }
+
+}
diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/src/main/java/org/apache/karaf/examples/rest/client/http/ListBookingCommand.java b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/src/main/java/org/apache/karaf/examples/rest/client/http/ListBookingCommand.java
new file mode 100644
index 0000000000..e1b5359191
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-http/src/main/java/org/apache/karaf/examples/rest/client/http/ListBookingCommand.java
@@ -0,0 +1,58 @@
+/*
+ *  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.karaf.examples.rest.client.http;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+@Service
+@Command(scope = "booking", name = "list", description = "List booking")
+public class ListBookingCommand implements Action {
+
+    @Option(name = "--url", description = "Location of the REST service", required = false, multiValued = false)
+    String restLocation = "http://localhost:8181/cxf/booking/";
+
+    @Override
+    public Object execute() throws Exception {
+        URL url = new URL(restLocation);
+
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setRequestMethod("GET");
+        connection.connect();
+
+        if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {
+            BufferedReader buffer = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            String line;
+            StringBuffer sb = new StringBuffer();
+            while ((line = buffer.readLine())!= null) {
+                sb.append(line);
+            }
+            System.out.println(sb.toString());
+        } else {
+            System.err.println("Error when sending GET method : HTTP_CODE = " + connection.getResponseCode());
+        }
+        return null;
+    }
+
+}
diff --git a/demos/profiles/pom.xml b/examples/karaf-rest-example/karaf-rest-example-client/pom.xml
similarity index 74%
rename from demos/profiles/pom.xml
rename to examples/karaf-rest-example/karaf-rest-example-client/pom.xml
index e9e53aa64d..bbdf45efab 100644
--- a/demos/profiles/pom.xml
+++ b/examples/karaf-rest-example/karaf-rest-example-client/pom.xml
@@ -10,7 +10,7 @@
         (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
+           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,
@@ -22,21 +22,19 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.karaf</groupId>
-        <artifactId>karaf</artifactId>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-rest-example</artifactId>
         <version>4.2.1-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.karaf.demos.profiles</groupId>
-    <artifactId>profiles</artifactId>
+    <artifactId>karaf-rest-example-client</artifactId>
+    <name>Apache Karaf :: Examples :: REST :: Client</name>
     <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos :: Profiles</name>
 
     <modules>
-        <module>registry</module>
-        <module>dynamic</module>
-        <module>static</module>
+        <module>karaf-rest-example-client-cxf</module>
+        <module>karaf-rest-example-client-http</module>
     </modules>
 
 </project>
diff --git a/examples/karaf-rest-example/karaf-rest-example-features/pom.xml b/examples/karaf-rest-example/karaf-rest-example-features/pom.xml
new file mode 100644
index 0000000000..1872b931e3
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-rest-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-rest-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: REST :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..636520ce3e
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml
@@ -0,0 +1,51 @@
+<?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.
+-->
+<features name="karaf-rest-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxf.version}/xml/features</repository>
+    
+    <feature name="karaf-rest-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-api/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-rest-example-provider" version="${project.version}">
+        <feature version="${project.version}">karaf-rest-example-common</feature>
+        <feature dependency="true">http</feature>
+        <requirement>osgi.service;effective:=active;filter:=(objectClass=org.osgi.service.http.HttpService)</requirement>
+        <feature dependency="true">aries-blueprint</feature>
+        <feature version="${cxf.version}" dependency="true">cxf</feature>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
+        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-rest-example-client-http" version="${project.version}">
+        <feature version="${project.version}">karaf-rest-example-provider</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-client-http/${project.version}</bundle>
+    </feature>
+    
+    <feature name="karaf-rest-example-client-cxf" version="${project.version}">
+        <feature version="${project.version}">karaf-rest-example-provider</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-client-cxf/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-rest-example/karaf-rest-example-provider/pom.xml b/examples/karaf-rest-example/karaf-rest-example-provider/pom.xml
new file mode 100644
index 0000000000..1eb3b3f8f0
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-provider/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-rest-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-rest-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: REST :: Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-rest-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.rest.provider</Export-Package>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-rest-example/karaf-rest-example-provider/src/main/java/org/apache/karaf/examples/rest/provider/BookingServiceRest.java b/examples/karaf-rest-example/karaf-rest-example-provider/src/main/java/org/apache/karaf/examples/rest/provider/BookingServiceRest.java
new file mode 100644
index 0000000000..097ba2a861
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-provider/src/main/java/org/apache/karaf/examples/rest/provider/BookingServiceRest.java
@@ -0,0 +1,79 @@
+/*
+ *  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.karaf.examples.rest.provider;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+import org.apache.karaf.examples.rest.api.Booking;
+import org.apache.karaf.examples.rest.api.BookingService;
+
+@Path("/")
+public class BookingServiceRest implements BookingService {
+    
+    private final Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    @Path("/")
+    @Produces("application/json")
+    @GET
+    public Collection<Booking> list() {
+        return bookings.values();
+    }
+
+    @Override
+    @Path("/{id}")
+    @Produces("application/json")
+    @GET
+    public Booking get(@PathParam("id") Long id) {
+        return bookings.get(id);
+    }
+    
+    @Override
+    @Path("/")
+    @Consumes("application/json")
+    @POST
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+    @Override
+    @Path("/")
+    @Consumes("application/json")
+    @PUT
+    public void update(Booking booking) {
+        bookings.remove(booking.getId());
+        bookings.put(booking.getId(), booking);
+    }
+
+    @Override
+    @Path("/{id}")
+    @DELETE
+    public void remove(@PathParam("id") Long id) {
+        bookings.remove(id);
+    }
+}
diff --git a/examples/karaf-rest-example/karaf-rest-example-provider/src/main/resources/OSGI-INF/blueprint/rest.xml b/examples/karaf-rest-example/karaf-rest-example-provider/src/main/resources/OSGI-INF/blueprint/rest.xml
new file mode 100644
index 0000000000..51172b67c3
--- /dev/null
+++ b/examples/karaf-rest-example/karaf-rest-example-provider/src/main/resources/OSGI-INF/blueprint/rest.xml
@@ -0,0 +1,46 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
+           xmlns:cxf="http://cxf.apache.org/blueprint/core"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+             http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
+             http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
+             ">
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <jaxrs:server id="bookingRest" address="/booking">
+        <jaxrs:serviceBeans>
+            <ref component-id="bookingBean" />
+        </jaxrs:serviceBeans>
+        <jaxrs:providers>
+            <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
+        </jaxrs:providers>
+    </jaxrs:server>
+
+    <bean id="bookingBean" class="org.apache.karaf.examples.rest.provider.BookingServiceRest"/>
+
+</blueprint>
diff --git a/examples/karaf-rest-example/pom.xml b/examples/karaf-rest-example/pom.xml
new file mode 100644
index 0000000000..73e7ee513c
--- /dev/null
+++ b/examples/karaf-rest-example/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-rest-example</artifactId>
+    <name>Apache Karaf :: Examples :: REST</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-rest-example-api</module>
+        <module>karaf-rest-example-provider</module>
+        <module>karaf-rest-example-client</module>
+        <module>karaf-rest-example-features</module>
+    </modules>
+    
+    <properties>
+        <cxf.version>[3,4)</cxf.version>
+        <jackson.version>2.9.4</jackson.version>
+    </properties>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scheduler-example/README.md b/examples/karaf-scheduler-example/README.md
new file mode 100644
index 0000000000..74d1afff77
--- /dev/null
+++ b/examples/karaf-scheduler-example/README.md
@@ -0,0 +1,73 @@
+<!--
+    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.
+-->
+# Apache Karaf Scheduler example
+
+## Abstract
+
+This example shows you how to create a runnable service periodically executed by the Apache Karaf scheduler.
+
+More than executing periodically shell commands, the Karaf Scheduler uses whiteboard pattern to automatically schedule
+runnable services.
+
+In this example, we will register a Runnable service displaying a message in the shell console. As service properties, we 
+add details for the scheduler to periodically call our service.
+
+## Artifacts
+
+* **karaf-scheduler-example-runnable** is the core Runnable service with the scheduler details.
+* **karaf-scheduler-example-features** contains features used for deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features & Deployment
+
+On a running Karaf instance, register the features repository using:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-scheduler-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the runnable service feature:
+
+```
+karaf@root()> feature:install karaf-scheduler-example
+```
+
+## Usage
+
+Once you have installed the runnable feature, you will periodically see this kind of message in the shell console:
+
+```
+Hello Karaf User !
+```
+
+You can see the task in the Karaf scheduler using the `scheduler:list` command:
+
+```
+karaf@root()> scheduler:list 
+Name        │ Schedule
+────────────┼──────────────────────────────────────────
+example.116 │ at(2018-02-19T11:07:24.829+01:00, -1, 10)
+```
diff --git a/examples/karaf-scheduler-example/karaf-scheduler-example-features/pom.xml b/examples/karaf-scheduler-example/karaf-scheduler-example-features/pom.xml
new file mode 100644
index 0000000000..11aaefe745
--- /dev/null
+++ b/examples/karaf-scheduler-example/karaf-scheduler-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-scheduler-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scheduler-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: Scheduler :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scheduler-example/karaf-scheduler-example-features/src/main/feature/feature.xml b/examples/karaf-scheduler-example/karaf-scheduler-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..f6a174d23c
--- /dev/null
+++ b/examples/karaf-scheduler-example/karaf-scheduler-example-features/src/main/feature/feature.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<features name="karaf-scheduler-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-scheduler-example" version="${project.version}">
+        <feature prerequisite="true">scheduler</feature>
+        <feature prerequisite="true">scr</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-scheduler-example-runnable/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-scheduler-example/karaf-scheduler-example-runnable/pom.xml b/examples/karaf-scheduler-example/karaf-scheduler-example-runnable/pom.xml
new file mode 100644
index 0000000000..8cf1ee28c4
--- /dev/null
+++ b/examples/karaf-scheduler-example/karaf-scheduler-example-runnable/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-scheduler-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scheduler-example-runnable</artifactId>
+    <name>Apache Karaf :: Examples :: Scheduler :: Runnable</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scheduler-example/karaf-scheduler-example-runnable/src/main/java/org/apache/karaf/examples/scheduler/RunnableService.java b/examples/karaf-scheduler-example/karaf-scheduler-example-runnable/src/main/java/org/apache/karaf/examples/scheduler/RunnableService.java
new file mode 100644
index 0000000000..c5375f4835
--- /dev/null
+++ b/examples/karaf-scheduler-example/karaf-scheduler-example-runnable/src/main/java/org/apache/karaf/examples/scheduler/RunnableService.java
@@ -0,0 +1,35 @@
+/*
+ *  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.karaf.examples.scheduler;
+
+import org.osgi.service.component.annotations.Component;
+
+@Component(
+        property = {
+                "scheduler.name=example",
+                "scheduler.period:Long=10",
+                "scheduler.concurrent:Boolean=false"
+        }
+)
+public class RunnableService implements Runnable {
+
+    @Override
+    public void run() {
+        System.out.print("Hello Karaf user !");
+    }
+
+}
diff --git a/examples/karaf-scheduler-example/pom.xml b/examples/karaf-scheduler-example/pom.xml
new file mode 100644
index 0000000000..765aba15ac
--- /dev/null
+++ b/examples/karaf-scheduler-example/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scheduler-example</artifactId>
+    <name>Apache Karaf :: Examples :: Scheduler</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-scheduler-example-runnable</module>
+        <module>karaf-scheduler-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scr-example/README.md b/examples/karaf-scr-example/README.md
new file mode 100644
index 0000000000..6535e504f1
--- /dev/null
+++ b/examples/karaf-scr-example/README.md
@@ -0,0 +1,70 @@
+<!--
+    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.
+-->
+# Apache Karaf SCR example
+
+## Abstract
+
+SCR (Service Component Runtime) is a convenient way to use services with annotations.
+
+As it's part of the OSGi compendium specification, you don't need any large dependency to use it.
+
+## Artifacts
+
+* **karaf-ds-example-api** provides the `BookingService` interface and `Booking` POJO.
+* **karaf-ds-example-provider** implements and exposes a `BookingService` using Component annotations.
+* **karaf-ds-example-client** uses a `BookingService` reference injected thanks to Reference annotations.
+* **karaf-ds-example-features** contains a Karaf features repository used for the deployment.
+
+## Build
+
+Simply use Apache Maven:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, you register the example features repository with:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-scr-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the `karaf-scr-example-client` feature:
+
+```
+karaf@root()> feature:install karaf-scr-example-client
+```
+
+This feature installs the `karaf-scr-example-provider` feature providing the service, and the client bundle.
+
+## Usage
+
+When you install the client feature, you should see on the console:
+
+```
+karaf@root()>                                                                                                                                                                                     
+-----------
+1 - AF520 - John Doe
+
+-----------
+2 - AF59 - Alan Parker
+
+```
\ No newline at end of file
diff --git a/examples/karaf-scr-example/karaf-scr-example-api/pom.xml b/examples/karaf-scr-example/karaf-scr-example-api/pom.xml
new file mode 100644
index 0000000000..a273ebfd92
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-api/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-scr-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scr-example-api</artifactId>
+    <name>Apache Karaf :: Examples :: SCR :: API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.apache.karaf.examples.scr.api
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/Booking.java b/examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/Booking.java
new file mode 100644
index 0000000000..4895d00163
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/Booking.java
@@ -0,0 +1,52 @@
+/*
+ *  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.karaf.examples.scr.api;
+
+/**
+ * A regular POJO.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/BookingService.java b/examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/BookingService.java
new file mode 100644
index 0000000000..c030db987f
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/BookingService.java
@@ -0,0 +1,33 @@
+/*
+ *  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.karaf.examples.scr.api;
+
+import java.util.Collection;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    Collection<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+
+    void remove(Long id);
+}
diff --git a/examples/karaf-scr-example/karaf-scr-example-client/pom.xml b/examples/karaf-scr-example/karaf-scr-example-client/pom.xml
new file mode 100644
index 0000000000..e6670d0c07
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-client/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-scr-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scr-example-client</artifactId>
+    <name>Apache Karaf :: Examples :: SCR :: Client</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-scr-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scr-example/karaf-scr-example-client/src/main/java/org/apache/karaf/examples/scr/client/ConsoleClient.java b/examples/karaf-scr-example/karaf-scr-example-client/src/main/java/org/apache/karaf/examples/scr/client/ConsoleClient.java
new file mode 100644
index 0000000000..1b2164494e
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-client/src/main/java/org/apache/karaf/examples/scr/client/ConsoleClient.java
@@ -0,0 +1,73 @@
+/*
+ *  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.karaf.examples.scr.client;
+
+import org.apache.karaf.examples.scr.api.Booking;
+import org.apache.karaf.examples.scr.api.BookingService;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+
+@Component
+public class ConsoleClient {
+
+    private boolean running;
+
+    @Reference
+    private BookingService bookingService;
+
+    @Activate
+    public void start() throws Exception {
+        Booking booking = new Booking();
+        booking.setId(1L);
+        booking.setFlight("AF520");
+        booking.setCustomer("John Doe");
+        bookingService.add(booking);
+        booking = new Booking();
+        booking.setId(2L);
+        booking.setFlight("AF59");
+        booking.setCustomer("Alan Parker");
+        bookingService.add(booking);
+
+        running = true;
+        Thread thread = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                while (running) {
+                    try {
+                        Thread.sleep(5000);
+                        for (Booking booking : bookingService.list()) {
+                            System.out.println();
+                            System.out.println("-----------");
+                            System.out.println(booking.getId() + " - " + booking.getFlight() + " - " + booking.getCustomer());
+                        }
+                    } catch (Exception e) {
+                        // nothing to do
+                    }
+                }
+            }
+        });
+        thread.start();
+    }
+
+    @Deactivate
+    public void deactivate() throws Exception {
+        running = false;
+    }
+
+}
diff --git a/examples/karaf-scr-example/karaf-scr-example-features/pom.xml b/examples/karaf-scr-example/karaf-scr-example-features/pom.xml
new file mode 100644
index 0000000000..8883b6d070
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-scr-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scr-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: SCR :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scr-example/karaf-scr-example-features/src/main/feature/feature.xml b/examples/karaf-scr-example/karaf-scr-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..894866d091
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-features/src/main/feature/feature.xml
@@ -0,0 +1,36 @@
+<?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.
+-->
+<features name="karaf-scr-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-scr-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-scr-example-api/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-scr-example-provider" version="${project.version}">
+        <feature version="${project.version}">karaf-scr-example-common</feature>
+        <feature prerequisite="true">scr</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-scr-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-scr-example-client" version="${project.version}">
+        <feature version="${project.version}" prerequisite="true">karaf-scr-example-provider</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-scr-example-client/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-scr-example/karaf-scr-example-provider/pom.xml b/examples/karaf-scr-example/karaf-scr-example-provider/pom.xml
new file mode 100644
index 0000000000..c18a048c49
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-provider/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-scr-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scr-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: SCR :: Service Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-scr-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.karaf.examples.scr.provider
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-scr-example/karaf-scr-example-provider/src/main/java/org/apache/karaf/examples/scr/provider/BookingServiceMemoryImpl.java b/examples/karaf-scr-example/karaf-scr-example-provider/src/main/java/org/apache/karaf/examples/scr/provider/BookingServiceMemoryImpl.java
new file mode 100644
index 0000000000..fd7aefb7bc
--- /dev/null
+++ b/examples/karaf-scr-example/karaf-scr-example-provider/src/main/java/org/apache/karaf/examples/scr/provider/BookingServiceMemoryImpl.java
@@ -0,0 +1,55 @@
+/*
+ *  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.karaf.examples.scr.provider;
+
+import org.apache.karaf.examples.scr.api.Booking;
+import org.apache.karaf.examples.scr.api.BookingService;
+import org.osgi.service.component.annotations.Component;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Simple implementation of the {@link BookingService} storing the {@link Booking}
+ * instances in a list in memory.
+ */
+@Component
+public class BookingServiceMemoryImpl implements BookingService {
+
+    private final Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    public Collection<Booking> list() {
+        return bookings.values();
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return bookings.get(id);
+    }
+
+    @Override
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+    @Override
+    public void remove(Long id) {
+        bookings.remove(id);
+    }
+}
diff --git a/examples/karaf-scr-example/pom.xml b/examples/karaf-scr-example/pom.xml
new file mode 100644
index 0000000000..0ffedb1816
--- /dev/null
+++ b/examples/karaf-scr-example/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-scr-example</artifactId>
+    <name>Apache Karaf :: Examples :: SCR</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-scr-example-api</module>
+        <module>karaf-scr-example-provider</module>
+        <module>karaf-scr-example-client</module>
+        <module>karaf-scr-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/README.md b/examples/karaf-servlet-example/README.md
new file mode 100644
index 0000000000..92d679b245
--- /dev/null
+++ b/examples/karaf-servlet-example/README.md
@@ -0,0 +1,87 @@
+<!--
+    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.
+-->
+# Apache Karaf Servlet examples
+
+## Abstract
+
+This example show how to register a servlet in the Karaf HTTP Service.
+
+It uses different approaches:
+
+1. Using `@WebServlet` annotation using the Karaf annotation scanner
+2. Registering a servlet directly into the Karaf HTTP service
+3. Using Karaf Servlet whiteboard pattern with blueprint
+4. Using Karaf Servlet whiteboard pattern with SCR
+
+## Artifacts
+
+* **karaf-servlet-example-annotation** is a bundle using `@WebServlet` Servlet 3.0 annotation to register.
+* **karaf-servlet-example-registration** is a bundle that register a servlet directly into the Karaf HTTP service.
+* **karaf-servlet-example-blueprint** is a Blueprint bundle registering a Servlet service used by the Karaf Servlet whiteboard pattern.
+* **karaf-servlet-example-scr** is a SCR bundle registering a Servlet service used by the Karaf Servlet whiteboard pattern.
+* **karaf-servlet-example-features** provides a Karaf features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, you register the example features repository with:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-servlet-example-features/4.2.1-SNAPSHOT/xml
+```
+
+The `karaf-servlet-example-annotation` feature installs the required features (HTTP service) and register the servlet using
+Servlet 3.0 annotation:
+
+```
+karaf@root()> feature:install karaf-servlet-example-annotation
+```
+
+The `karaf-servlet-example-registration` feature installs the required features (HTTP service) and register the servlet by hand in the Karaf HTTP service:
+
+```
+karaf@root()> feature:install karaf-servlet-example-registration
+```
+
+The `karaf-servlet-example-blueprint` feature installs the required features (HTTP service & blueprint) and register the servlet using
+a Servlet service:
+
+```
+karaf@root()> feature:install karaf-servlet-example-blueprint
+```
+
+The `karaf-servlet-example-scr` feature installs the required features (HTTP service & SCR) and register the servlet using
+a Servlet service:
+
+```
+karaf@root()> feature:install karaf-servlet-example-scr
+```
+
+## Usage
+
+Whatever feature you use, you can access the servlet on the following URL:
+
+[http://localhost:8181/servlet-example]
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-annotation/pom.xml b/examples/karaf-servlet-example/karaf-servlet-example-annotation/pom.xml
new file mode 100644
index 0000000000..1b353541d7
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-annotation/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-servlet-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-servlet-example-annotation</artifactId>
+    <name>Apache Karaf :: Examples :: Servlet :: Annotation</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.1.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <_wab>src/main/webapp/</_wab>
+                        <Web-ContextPath>servlet-example</Web-ContextPath>
+                        <Export-Package>!*</Export-Package>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-annotation/src/main/java/org/apache/karaf/examples/servlet/annotation/ExampleServlet.java b/examples/karaf-servlet-example/karaf-servlet-example-annotation/src/main/java/org/apache/karaf/examples/servlet/annotation/ExampleServlet.java
new file mode 100644
index 0000000000..498f1598bf
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-annotation/src/main/java/org/apache/karaf/examples/servlet/annotation/ExampleServlet.java
@@ -0,0 +1,54 @@
+/*
+ *  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.karaf.examples.servlet.annotation;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+@WebServlet(name = "ServletExample", urlPatterns = "/")
+public class ExampleServlet extends HttpServlet {
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        service(request, response);
+    }
+
+    @Override
+    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        service(request, response);
+    }
+
+    @Override
+    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        try (PrintWriter writer = response.getWriter()) {
+            writer.println("<html>");
+            writer.println("<head>");
+            writer.println("<title>Example</title>");
+            writer.println("</head>");
+            writer.println("<body align='center'>");
+            writer.println("<h1>Example Servlet</h1>");
+            writer.println("</body>");
+            writer.println("</html>");
+        }
+    }
+
+}
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-annotation/src/main/webapp/WEB-INF/web.xml b/examples/karaf-servlet-example/karaf-servlet-example-annotation/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..fb36193449
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-annotation/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+        Licensed 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.
+
+-->
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+         metadata-complete="false">
+
+    <display-name>Karaf Example</display-name>
+
+</web-app>
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-blueprint/pom.xml b/examples/karaf-servlet-example/karaf-servlet-example-blueprint/pom.xml
new file mode 100644
index 0000000000..1c057f1fa5
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-blueprint/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-servlet-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-servlet-example-blueprint</artifactId>
+    <name>Apache Karaf :: Examples :: Servlet :: Blueprint</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.0.1</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-blueprint/src/main/java/org/apache/karaf/examples/servlet/blueprint/ExampleServlet.java b/examples/karaf-servlet-example/karaf-servlet-example-blueprint/src/main/java/org/apache/karaf/examples/servlet/blueprint/ExampleServlet.java
new file mode 100644
index 0000000000..75f24413ce
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-blueprint/src/main/java/org/apache/karaf/examples/servlet/blueprint/ExampleServlet.java
@@ -0,0 +1,42 @@
+/*
+ *  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.karaf.examples.servlet.blueprint;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+public class ExampleServlet extends HttpServlet {
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        try (PrintWriter writer = response.getWriter()) {
+            writer.println("<html>");
+            writer.println("<head>");
+            writer.println("<title>Example</title>");
+            writer.println("</head>");
+            writer.println("<body align='center'>");
+            writer.println("<h1>Example Servlet</h1>");
+            writer.println("</body>");
+            writer.println("</html>");
+        }
+    }
+
+}
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-blueprint/src/main/resources/OSGI-INF/blueprint/servlet.xml b/examples/karaf-servlet-example/karaf-servlet-example-blueprint/src/main/resources/OSGI-INF/blueprint/servlet.xml
new file mode 100644
index 0000000000..6288083b7a
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-blueprint/src/main/resources/OSGI-INF/blueprint/servlet.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.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.
+    -->
+
+    <service interface="javax.servlet.Servlet">
+        <service-properties>
+            <entry key="alias" value="/servlet-example"/>
+            <entry key="servlet-name" value="Example"/>
+        </service-properties>
+        <bean class="org.apache.karaf.examples.servlet.blueprint.ExampleServlet"/>
+    </service>
+
+</blueprint>
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-features/pom.xml b/examples/karaf-servlet-example/karaf-servlet-example-features/pom.xml
new file mode 100644
index 0000000000..8df582e3c0
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-servlet-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-servlet-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: Servlet :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-features/src/main/feature/feature.xml b/examples/karaf-servlet-example/karaf-servlet-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..1b1af79dd1
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-features/src/main/feature/feature.xml
@@ -0,0 +1,45 @@
+<?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.
+-->
+<features name="karaf-servlet-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-servlet-example-annotation" version="${project.version}">
+        <feature prerequisite="true">war</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-servlet-example-annotation/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-servlet-example-registration" version="${project.version}">
+        <feature prerequisite="true">http</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-servlet-example-registration/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-servlet-example-blueprint" version="${project.version}">
+        <feature prerequisite="true">aries-blueprint</feature>
+        <feature prerequisite="true">http</feature>
+        <feature prerequisite="true">http-whiteboard</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-servlet-example-blueprint/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-servlet-example-scr" version="${project.version}">
+        <feature prerequisite="true">scr</feature>
+        <feature prerequisite="true">http</feature>
+        <feature prerequisite="true">http-whiteboard</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-servlet-example-scr/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-registration/pom.xml b/examples/karaf-servlet-example/karaf-servlet-example-registration/pom.xml
new file mode 100644
index 0000000000..228802b816
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-registration/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-servlet-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-servlet-example-registration</artifactId>
+    <name>Apache Karaf :: Examples :: Servlet :: Registration</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>org.apache.karaf.examples.servlet.registration.Activator</Bundle-Activator>
+                        <Private-Package>
+                            org.apache.karaf.examples.servlet.registration
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-registration/src/main/java/org/apache/karaf/examples/servlet/registration/Activator.java b/examples/karaf-servlet-example/karaf-servlet-example-registration/src/main/java/org/apache/karaf/examples/servlet/registration/Activator.java
new file mode 100644
index 0000000000..b3b1372e3e
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-registration/src/main/java/org/apache/karaf/examples/servlet/registration/Activator.java
@@ -0,0 +1,59 @@
+/*
+ *  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.karaf.examples.servlet.registration;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpService;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class Activator implements BundleActivator {
+
+    private ServiceTracker httpServiceTracker;
+
+    @Override
+    public void start(BundleContext bundleContext) throws Exception {
+        httpServiceTracker = new ServiceTracker(bundleContext, HttpService.class.getName(), null) {
+            @Override
+            public Object addingService(ServiceReference ref) {
+                HttpService httpService = (HttpService) bundleContext.getService(ref);
+                try {
+                    httpService.registerServlet("/servlet-example", new ExampleServlet(), null, null);
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+                return httpService;
+            }
+
+            public void removedService(ServiceReference ref, Object service) {
+                try {
+                    ((HttpService) service).unregister("/servlet-example");
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        };
+        httpServiceTracker.open();
+    }
+
+    @Override
+    public void stop(BundleContext bundleContext) throws Exception {
+        httpServiceTracker.close();
+    }
+
+}
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-registration/src/main/java/org/apache/karaf/examples/servlet/registration/ExampleServlet.java b/examples/karaf-servlet-example/karaf-servlet-example-registration/src/main/java/org/apache/karaf/examples/servlet/registration/ExampleServlet.java
new file mode 100644
index 0000000000..bf2534fbdd
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-registration/src/main/java/org/apache/karaf/examples/servlet/registration/ExampleServlet.java
@@ -0,0 +1,42 @@
+/*
+ *  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.karaf.examples.servlet.registration;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+public class ExampleServlet extends HttpServlet {
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        try (PrintWriter writer = response.getWriter()) {
+            writer.println("<html>");
+            writer.println("<head>");
+            writer.println("<title>Example</title>");
+            writer.println("</head>");
+            writer.println("<body align='center'>");
+            writer.println("<h1>Example Servlet</h1>");
+            writer.println("</body>");
+            writer.println("</html>");
+        }
+    }
+
+}
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-scr/pom.xml b/examples/karaf-servlet-example/karaf-servlet-example-scr/pom.xml
new file mode 100644
index 0000000000..ca3b1bb93d
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-scr/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-servlet-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-servlet-example-scr</artifactId>
+    <name>Apache Karaf :: Examples :: Servlet :: SCR</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-servlet-example/karaf-servlet-example-scr/src/main/java/org/apache/karaf/examples/servlet/scr/ExampleServlet.java b/examples/karaf-servlet-example/karaf-servlet-example-scr/src/main/java/org/apache/karaf/examples/servlet/scr/ExampleServlet.java
new file mode 100644
index 0000000000..dfc56c272a
--- /dev/null
+++ b/examples/karaf-servlet-example/karaf-servlet-example-scr/src/main/java/org/apache/karaf/examples/servlet/scr/ExampleServlet.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.karaf.examples.servlet.scr;
+
+import org.osgi.service.component.annotations.Component;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+@Component(
+        property = { "alias=/servlet-example", "servlet-name=Example"}
+)
+public class ExampleServlet extends HttpServlet implements Servlet {
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        try (PrintWriter writer = response.getWriter()) {
+            writer.println("<html>");
+            writer.println("<head>");
+            writer.println("<title>Example</title>");
+            writer.println("</head>");
+            writer.println("<body align='center'>");
+            writer.println("<h1>Example Servlet</h1>");
+            writer.println("</body>");
+            writer.println("</html>");
+        }
+    }
+
+}
diff --git a/examples/karaf-servlet-example/pom.xml b/examples/karaf-servlet-example/pom.xml
new file mode 100644
index 0000000000..6f293fdb1a
--- /dev/null
+++ b/examples/karaf-servlet-example/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-servlet-example</artifactId>
+    <name>Apache Karaf :: Examples :: Servlet</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-servlet-example-annotation</module>
+        <module>karaf-servlet-example-registration</module>
+        <module>karaf-servlet-example-blueprint</module>
+        <module>karaf-servlet-example-scr</module>
+        <module>karaf-servlet-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-soap-example/README.md b/examples/karaf-soap-example/README.md
new file mode 100644
index 0000000000..354d420638
--- /dev/null
+++ b/examples/karaf-soap-example/README.md
@@ -0,0 +1,90 @@
+<!--
+    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.
+-->
+# Apache Karaf SOAP Example
+
+## Abstract
+
+This example shows how to use JAX-WS to implement a SOAP service.
+
+This example uses blueprint to deal with the jaxws-server and Apache CXF as the implementation of the JAXWS specification.
+
+It implements a `BookingService` with a SOAP WS implementation. 
+
+The "client" bundle uses the `BookingService` with a SOAP client stub.
+
+## Artifacts
+
+* **karaf-soap-example-api** is a common bundle containing the `Booking` POJO and the `BookingService` interface.   
+* **karaf-soap-example-provider** is a blueprint bundle providing the `BookingServiceSoap` implementation of the `BookingService` interface.
+* **karaf-soap-example-client** is a CXF client to the `BookingService` SOAP.
+* **karaf-soap-example-features** provides a Karaf features repository used for the deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Feature and Deployment
+
+On a running Karaf instance, register the features repository using:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-soap-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the service provider feature:
+
+```
+karaf@root()> feature:install karaf-soap-example-provider
+```
+
+And the service client feature:
+
+```
+karaf@root()> feature:install karaf-soap-example-client
+```
+
+## Usage
+
+You can take a look on the WSDL generated for our SOAP WS:
+
+```
+http://localhost:8181/cxf/example?wsdl
+```
+
+The client feature installs `booking:*` commands. You can add a new booking using the `booking:add` command:
+
+```
+karaf@root()> booking:add 1 TEST TEST
+```
+
+The `booking:list` command displays the list of bookings:
+
+```
+karaf@root()> booking:list
+ID | Flight | Customer
+-----------------------
+1  | TEST   | TEST
+```
+
+These commands use a CXF SOAP WebService client to interact with the Booking WebService.
+
diff --git a/examples/karaf-soap-example/karaf-soap-example-api/pom.xml b/examples/karaf-soap-example/karaf-soap-example-api/pom.xml
new file mode 100644
index 0000000000..673c6ca4fd
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-api/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-soap-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-soap-example-api</artifactId>
+    <name>Apache Karaf :: Examples :: SOAP :: API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.soap.api</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-soap-example/karaf-soap-example-api/src/main/java/org/apache/karaf/examples/soap/api/Booking.java b/examples/karaf-soap-example/karaf-soap-example-api/src/main/java/org/apache/karaf/examples/soap/api/Booking.java
new file mode 100644
index 0000000000..19bea31ce0
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-api/src/main/java/org/apache/karaf/examples/soap/api/Booking.java
@@ -0,0 +1,52 @@
+/*
+ *  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.karaf.examples.soap.api;
+
+/**
+ * A regular POJO.
+ */
+public class Booking {
+
+    private Long id;
+
+    private String customer;
+    private String flight;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getFlight() {
+        return flight;
+    }
+
+    public void setFlight(String flight) {
+        this.flight = flight;
+    }
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-api/src/main/java/org/apache/karaf/examples/soap/api/BookingService.java b/examples/karaf-soap-example/karaf-soap-example-api/src/main/java/org/apache/karaf/examples/soap/api/BookingService.java
new file mode 100644
index 0000000000..fddc44b6e8
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-api/src/main/java/org/apache/karaf/examples/soap/api/BookingService.java
@@ -0,0 +1,33 @@
+/*
+ *  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.karaf.examples.soap.api;
+
+import java.util.Collection;
+
+/**
+ * Simple interface describing the booking service.
+ */
+public interface BookingService {
+
+    Collection<Booking> list();
+
+    Booking get(Long id);
+
+    void add(Booking booking);
+    
+    void remove(Long id);
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-client/pom.xml b/examples/karaf-soap-example/karaf-soap-example-client/pom.xml
new file mode 100644
index 0000000000..01b61d1ea2
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-client/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-soap-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-soap-example-client</artifactId>
+    <name>Apache Karaf :: Examples :: SOAP :: Client</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-soap-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-soap-example-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-services-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/AddCommand.java b/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/AddCommand.java
new file mode 100644
index 0000000000..42b81668bf
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/AddCommand.java
@@ -0,0 +1,53 @@
+/*
+ *  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.karaf.examples.soap.client;
+
+import org.apache.karaf.examples.soap.api.Booking;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+@Service
+@Command(scope = "booking", name = "add", description = "Add a booking")
+public class AddCommand implements Action {
+
+    @Argument(index = 0, name = "ID", description = "Booking ID", required = true, multiValued = false)
+    long id;
+
+    @Argument(index = 1, name = "customer", description = "Booking customer", required = true, multiValued = false)
+    String customer;
+
+    @Argument(index = 2, name = "flight", description = "Booking flight", required = true, multiValued = false)
+    String flight;
+
+    @Option(name = "--url", description = "Location of the SOAP service", required = false, multiValued = false)
+    String url = "http://localhost:8181/cxf/example";
+
+    @Override
+    public Object execute() throws Exception {
+        CxfClient client = new CxfClient(url);
+        Booking booking = new Booking();
+        booking.setId(id);
+        booking.setCustomer(customer);
+        booking.setFlight(flight);
+        client.add(booking);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/CxfClient.java b/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/CxfClient.java
new file mode 100644
index 0000000000..0df8961ca5
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/CxfClient.java
@@ -0,0 +1,44 @@
+/*
+ *  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.karaf.examples.soap.client;
+
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.karaf.examples.soap.api.Booking;
+import org.apache.karaf.examples.soap.provider.BookingServiceSoap;
+
+import java.util.Collection;
+
+public class CxfClient {
+
+    private BookingServiceSoap bookingService;
+
+    public CxfClient(String url) {
+        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
+        factory.setAddress(url);
+        factory.setServiceClass(BookingServiceSoap.class);
+        bookingService = (BookingServiceSoap) factory.create();
+    }
+
+    public void add(Booking booking) {
+        bookingService.add(booking);
+    }
+
+    public Collection<Booking> list() {
+        return bookingService.list();
+    }
+
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/ListCommand.java b/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/ListCommand.java
new file mode 100644
index 0000000000..d1730ef4d8
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-client/src/main/java/org/apache/karaf/examples/soap/client/ListCommand.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.examples.soap.client;
+
+import org.apache.karaf.examples.soap.api.Booking;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.support.table.ShellTable;
+
+@Service
+@Command(scope = "booking", name = "list", description = "List bookings")
+public class ListCommand implements Action {
+
+    @Option(name = "--url", description = "Location of the SOAP service", required = false, multiValued = false)
+    String url = "http://localhost:8181/cxf/example";
+
+    @Override
+    public Object execute() throws Exception {
+        CxfClient client = new CxfClient(url);
+        ShellTable table = new ShellTable();
+        table.column("ID");
+        table.column("Customer");
+        table.column("Flight");
+        if (client.list() != null) {
+            for (Booking booking : client.list()) {
+                table.addRow().addContent(booking.getId(), booking.getCustomer(), booking.getFlight());
+            }
+        }
+        table.print(System.out);
+        return null;
+    }
+
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-features/pom.xml b/examples/karaf-soap-example/karaf-soap-example-features/pom.xml
new file mode 100644
index 0000000000..1af3a776e0
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-soap-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-soap-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: SOAP :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-soap-example/karaf-soap-example-features/src/main/feature/feature.xml b/examples/karaf-soap-example/karaf-soap-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..6778411fae
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-features/src/main/feature/feature.xml
@@ -0,0 +1,41 @@
+<?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.
+-->
+<features name="karaf-soap-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.5.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.5.0">
+
+    <repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxf.version}/xml/features</repository>
+
+    <feature name="karaf-soap-example-common" version="${project.version}">
+        <bundle>mvn:org.apache.karaf.examples/karaf-soap-example-api/${project.version}</bundle>
+    </feature>
+    
+    <feature name="karaf-soap-example-provider" version="${project.version}">
+        <feature dependency="true">karaf-soap-example-common</feature>
+        <feature dependency="true">http</feature>
+        <requirement>osgi.service;effective:=active;filter:=(objectClass=org.osgi.service.http.HttpService)</requirement>
+        <feature dependency="true">aries-blueprint</feature>
+        <feature version="${cxf.version}" dependency="true">cxf-jaxws</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-soap-example-provider/${project.version}</bundle>
+    </feature>
+
+    <feature name="karaf-soap-example-client" version="${project.version}">
+        <feature version="${cxf.version}" dependency="true">cxf-jaxws</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-soap-example-client/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-soap-example/karaf-soap-example-provider/pom.xml b/examples/karaf-soap-example/karaf-soap-example-provider/pom.xml
new file mode 100644
index 0000000000..1ab4ee6ca3
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-provider/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-soap-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-soap-example-provider</artifactId>
+    <name>Apache Karaf :: Examples :: SOAP :: Provider</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-soap-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.karaf.examples.soap.provider</Export-Package>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-soap-example/karaf-soap-example-provider/src/main/java/org/apache/karaf/examples/soap/provider/BookingServiceSoap.java b/examples/karaf-soap-example/karaf-soap-example-provider/src/main/java/org/apache/karaf/examples/soap/provider/BookingServiceSoap.java
new file mode 100644
index 0000000000..63207da619
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-provider/src/main/java/org/apache/karaf/examples/soap/provider/BookingServiceSoap.java
@@ -0,0 +1,26 @@
+/*
+ *  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.karaf.examples.soap.provider;
+
+import org.apache.karaf.examples.soap.api.BookingService;
+
+import javax.jws.WebService;
+
+@WebService
+public interface BookingServiceSoap extends BookingService {
+
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-provider/src/main/java/org/apache/karaf/examples/soap/provider/BookingServiceSoapImpl.java b/examples/karaf-soap-example/karaf-soap-example-provider/src/main/java/org/apache/karaf/examples/soap/provider/BookingServiceSoapImpl.java
new file mode 100644
index 0000000000..eab130494f
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-provider/src/main/java/org/apache/karaf/examples/soap/provider/BookingServiceSoapImpl.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.examples.soap.provider;
+
+import java.util.*;
+
+import org.apache.karaf.examples.soap.api.Booking;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface="org.apache.karaf.examples.soap.provider.BookingServiceSoap", serviceName="Booking")
+public class BookingServiceSoapImpl implements BookingServiceSoap {
+
+    private Map<Long, Booking> bookings = new HashMap<>();
+
+    @Override
+    public Collection<Booking> list() {
+        return bookings.values();
+    }
+
+    @Override
+    public Booking get(Long id) {
+        return bookings.get(id);
+    }
+
+    @Override
+    public void add(Booking booking) {
+        bookings.put(booking.getId(), booking);
+    }
+
+    @Override
+    public void remove(Long id) {
+        bookings.remove(id);
+    }
+}
diff --git a/examples/karaf-soap-example/karaf-soap-example-provider/src/main/resources/OSGI-INF/blueprint/soap.xml b/examples/karaf-soap-example/karaf-soap-example-provider/src/main/resources/OSGI-INF/blueprint/soap.xml
new file mode 100644
index 0000000000..50908e5e86
--- /dev/null
+++ b/examples/karaf-soap-example/karaf-soap-example-provider/src/main/resources/OSGI-INF/blueprint/soap.xml
@@ -0,0 +1,41 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
+           xmlns:cxf="http://cxf.apache.org/blueprint/core"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+             http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
+             http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
+             ">
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <jaxws:server serviceClass="org.apache.karaf.examples.soap.provider.BookingServiceSoap" address="/example">
+        <jaxws:serviceBean>
+            <bean class="org.apache.karaf.examples.soap.provider.BookingServiceSoapImpl"/>
+        </jaxws:serviceBean>
+    </jaxws:server>
+
+</blueprint>
diff --git a/examples/karaf-soap-example/pom.xml b/examples/karaf-soap-example/pom.xml
new file mode 100644
index 0000000000..49904832a5
--- /dev/null
+++ b/examples/karaf-soap-example/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-soap-example</artifactId>
+    <name>Apache Karaf :: Examples :: SOAP</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-soap-example-api</module>
+        <module>karaf-soap-example-provider</module>
+        <module>karaf-soap-example-client</module>
+        <module>karaf-soap-example-features</module>
+    </modules>
+    
+    <properties>
+        <cxf.version>[3,4)</cxf.version>
+    </properties>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-url-namespace-handler-example/README.md b/examples/karaf-url-namespace-handler-example/README.md
new file mode 100644
index 0000000000..d235360e65
--- /dev/null
+++ b/examples/karaf-url-namespace-handler-example/README.md
@@ -0,0 +1,63 @@
+<!--
+    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.
+-->
+# Apache Karaf URL Namespace Handler Example
+
+## Abstract
+
+This example shows how to create a new URL namespace handler and use it in all Apache Karaf parts.
+
+## Artifacts
+
+* **karaf-url-namespace-handler-example-core** is the core bundle providing the URL handler.
+* **karaf-url-namespace-handler-example-features** contains the features repository used for deployment.
+
+## Build
+
+The build uses Apache Maven. Simply use:
+
+```
+mvn clean install
+```
+
+## Features and Deployment
+
+On a running Karaf instance, register the features repository:
+
+```
+karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-url-namespace-handler-example-features/4.2.1-SNAPSHOT/xml
+```
+
+Then, you can install the `karaf-url-namespace-handler-example` feature:
+
+```
+karaf@root()> feature:install karaf-url-namespace-handler-example
+```
+
+## Usage
+
+Once you have installed the feature, you can use URL like `example:*` wrapping any already supported URL. When you use
+the `example:*` URL, a greeting message will be displayed.
+
+For instance:
+
+```
+karaf@root()> bundle:install example:mvn:commons-lang/commons-lang/2.6
+Thanks for using the Example URL !
+Bundle ID: 44
+```
\ No newline at end of file
diff --git a/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-core/pom.xml b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-core/pom.xml
new file mode 100644
index 0000000000..bff257bfc6
--- /dev/null
+++ b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-core/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-url-namespace-handler-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-url-namespace-handler-example-core</artifactId>
+    <name>Apache Karaf :: Examples :: URL Namespace Handler :: Core</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-core/src/main/java/org/apache/karaf/examples/url/ExampleUrlHandler.java b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-core/src/main/java/org/apache/karaf/examples/url/ExampleUrlHandler.java
new file mode 100644
index 0000000000..1fb31e49da
--- /dev/null
+++ b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-core/src/main/java/org/apache/karaf/examples/url/ExampleUrlHandler.java
@@ -0,0 +1,64 @@
+/*
+ *  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.karaf.examples.url;
+
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.url.AbstractURLStreamHandlerService;
+import org.osgi.service.url.URLStreamHandlerService;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+@Component(
+        property = { "url.handler.protocol=example" }
+)
+public class ExampleUrlHandler extends AbstractURLStreamHandlerService implements URLStreamHandlerService {
+
+    @Override
+    public URLConnection openConnection(URL url) throws IOException {
+        System.out.println("Thanks for using the Example URL !");
+        return new ExampleConnection(url);
+    }
+
+    class ExampleConnection extends URLConnection {
+
+        private InputStream inputStream;
+
+        public ExampleConnection(URL url) throws MalformedURLException {
+            super(new URL(url.toString().substring("example:".length())));
+        }
+
+        @Override
+        public void connect() throws IOException {
+            // fake, just using the regular URL
+            inputStream = url.openStream();
+        }
+
+        @Override
+        public InputStream getInputStream() throws IOException {
+            if (inputStream == null) {
+                connect();
+            }
+            return inputStream;
+        }
+    }
+
+
+}
diff --git a/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-features/pom.xml b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-features/pom.xml
new file mode 100644
index 0000000000..1652ed76a7
--- /dev/null
+++ b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-url-namespace-handler-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-url-namespace-handler-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: URL Namespace Handler :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/demos/web/src/main/webapp/index.jsp b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-features/src/main/feature/feature.xml
similarity index 55%
rename from demos/web/src/main/webapp/index.jsp
rename to examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-features/src/main/feature/feature.xml
index be3ddd49b2..20cdbb959b 100644
--- a/demos/web/src/main/webapp/index.jsp
+++ b/examples/karaf-url-namespace-handler-example/karaf-url-namespace-handler-example-features/src/main/feature/feature.xml
@@ -1,34 +1,26 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Apache Karaf</title>
-</head>
-<body>
-
-<h2>Welcome!</h2>
-
-<p>
-Welcome to Apache Karaf web application demo
-</p>
-
-<p>
-You can find more information about Karaf on the <a href="http://karaf.apache.org/">Apache Karaf Site</a>
-</p>
-</body>
-</html>
-	
+<?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.
+-->
+<features name="karaf-url-namespace-handler-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-url-namespace-handler-example" version="${project.version}">
+        <feature>scr</feature>
+        <bundle>mvn:org.apache.karaf.examples/karaf-url-namespace-handler-example-core/${project.version}</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-url-namespace-handler-example/pom.xml b/examples/karaf-url-namespace-handler-example/pom.xml
new file mode 100644
index 0000000000..fa658ce80d
--- /dev/null
+++ b/examples/karaf-url-namespace-handler-example/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-url-namespace-handler-example</artifactId>
+    <name>Apache Karaf :: Examples :: URL Namespace Handler</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-url-namespace-handler-example-core</module>
+        <module>karaf-url-namespace-handler-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-war-example/README.md b/examples/karaf-war-example/README.md
new file mode 100644
index 0000000000..df100586be
--- /dev/null
+++ b/examples/karaf-war-example/README.md
@@ -0,0 +1,43 @@
+<!--
+    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.
+-->
+# Apache Karaf WAR Example
+
+## Abstract
+
+As a polymorphic runtime, Apache Karaf is able to deploy and run lot of different kind of applications.
+
+It's especially possible to deploy a web application packaged as a war, as you can do in any web container.
+
+This example shows how to create a regular war to be deployed in Apache Karaf.
+
+## Artifacts
+
+* `karaf-war-example-webapp` is a regular simple war.
+* `karaf-war-example-features` provides a Karaf features repository used for deployment.
+
+## Build 
+
+Simply use:
+
+```
+mvn clean install
+```
+
+## Feature and Deployment
+
diff --git a/examples/karaf-war-example/karaf-war-example-features/pom.xml b/examples/karaf-war-example/karaf-war-example-features/pom.xml
new file mode 100644
index 0000000000..b9f87adbb6
--- /dev/null
+++ b/examples/karaf-war-example/karaf-war-example-features/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-war-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-war-example-features</artifactId>
+    <name>Apache Karaf :: Examples :: WAR :: Features</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/feature</directory>
+                <filtering>true</filtering>
+                <targetPath>${project.build.directory}/feature</targetPath>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>verify</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </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/feature/feature.xml</file>
+                                    <type>xml</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/examples/karaf-war-example/karaf-war-example-features/src/main/feature/feature.xml b/examples/karaf-war-example/karaf-war-example-features/src/main/feature/feature.xml
new file mode 100644
index 0000000000..9784402722
--- /dev/null
+++ b/examples/karaf-war-example/karaf-war-example-features/src/main/feature/feature.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+<features name="karaf-war-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
+
+    <feature name="karaf-war-example" version="${project.version}">
+        <feature prerequisite="true">war</feature>
+        <bundle>webbundle:mvn:org.apache.karaf.examples/karaf-war-example-webapp/${project.version}/war?Web-ContextPath=example</bundle>
+    </feature>
+
+</features>
diff --git a/examples/karaf-war-example/karaf-war-example-webapp/pom.xml b/examples/karaf-war-example/karaf-war-example-webapp/pom.xml
new file mode 100644
index 0000000000..f28c117300
--- /dev/null
+++ b/examples/karaf-war-example/karaf-war-example-webapp/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>karaf-war-example</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-war-example-webapp</artifactId>
+    <name>Apache Karaf :: Examples :: WAR :: WebApp</name>
+    <packaging>war</packaging>
+
+</project>
\ No newline at end of file
diff --git a/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml b/examples/karaf-war-example/karaf-war-example-webapp/src/main/webapp/WEB-INF/web.xml
similarity index 72%
rename from demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml
rename to examples/karaf-war-example/karaf-war-example-webapp/src/main/webapp/WEB-INF/web.xml
index 62068d1feb..82f00f6581 100644
--- a/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml
+++ b/examples/karaf-war-example/karaf-war-example-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,26 +1,22 @@
-<?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.
-
--->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
-
-    <bean id="screenshotDump" class="org.apache.karaf.diagnostic.demo.ScreenshotDumpProvider" />
-
-    <service ref="screenshotDump" auto-export="interfaces" />
-
-</blueprint>
\ No newline at end of file
+<?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.
+-->
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+    <!-- This is only here because Maven requires it to make a war. -->
+</web-app>
\ No newline at end of file
diff --git a/examples/karaf-war-example/karaf-war-example-webapp/src/main/webapp/index.jsp b/examples/karaf-war-example/karaf-war-example-webapp/src/main/webapp/index.jsp
new file mode 100644
index 0000000000..4baf062062
--- /dev/null
+++ b/examples/karaf-war-example/karaf-war-example-webapp/src/main/webapp/index.jsp
@@ -0,0 +1,30 @@
+<html>
+    <!--
+
+        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.
+    -->
+<head>
+<title>Hello World!</title>
+</head>
+<body>
+	<h1>Hello World!</h1>
+	<p>
+		It is now
+		<%= new java.util.Date() %></p>
+	<p>
+		You are coming from
+		<%= request.getRemoteAddr()  %></p>
+</body>
\ No newline at end of file
diff --git a/examples/karaf-war-example/pom.xml b/examples/karaf-war-example/pom.xml
new file mode 100644
index 0000000000..1df93edb98
--- /dev/null
+++ b/examples/karaf-war-example/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.examples</groupId>
+        <artifactId>apache-karaf-examples</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>karaf-war-example</artifactId>
+    <name>Apache Karaf :: Examples :: WAR</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-war-example-webapp</module>
+        <module>karaf-war-example-features</module>
+    </modules>
+
+</project>
\ No newline at end of file
diff --git a/examples/pom.xml b/examples/pom.xml
new file mode 100644
index 0000000000..1f008f3c4e
--- /dev/null
+++ b/examples/pom.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf</groupId>
+        <artifactId>karaf</artifactId>
+        <version>4.2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.karaf.examples</groupId>
+    <artifactId>apache-karaf-examples</artifactId>
+    <name>Apache Karaf :: Examples</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>karaf-bundle-example</module>
+        <module>karaf-blueprint-example</module>
+        <module>karaf-scr-example</module>
+        <module>karaf-branding-example</module>
+        <module>karaf-command-example</module>
+        <module>karaf-mbean-example</module>
+        <module>karaf-url-namespace-handler-example</module>
+        <module>karaf-log-appender-example</module>
+        <module>karaf-deployer-example</module>
+        <module>karaf-dump-example</module>
+        <!-- <module>karaf-jaas-config-example</module> -->
+        <!-- <module>karaf-jaas-login-module-example</module> -->
+        <!-- <module>karaf-encryption-example</module> -->
+        <module>karaf-servlet-example</module>
+        <module>karaf-war-example</module>
+        <!-- <module>karaf-jndi-example</module> -->
+        <module>karaf-jdbc-example</module>
+        <module>karaf-jms-example</module>
+        <module>karaf-jpa-example</module>
+        <!-- <module>karaf-cdi-example</module> -->
+        <module>karaf-rest-example</module>
+        <module>karaf-soap-example</module>
+        <module>karaf-scheduler-example</module>
+        <module>karaf-maven-example</module>
+        <!-- <module>karaf-camel-example</module> -->
+        <module>karaf-itest-example</module>
+        <module>karaf-profile-example</module>
+    </modules>
+
+</project>
diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
index efa65ad05a..dc3f1f727e 100644
--- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
+++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.net.ServerSocket;
+import java.net.URI;
 import java.net.URL;
 import java.security.Principal;
 import java.security.PrivilegedExceptionAction;
@@ -356,6 +357,10 @@ public String executeCommand(final String command, final Long timeout, final Boo
         return response;
     }
 
+    public void assertServiceAvailable(String type) {
+        Assert.assertNotNull(getOsgiService(type));
+    }
+
     public void assertServiceAvailable(Class type) {
         Assert.assertNotNull(getOsgiService(type));
     }
@@ -376,6 +381,52 @@ public void assertServiceAvailable(Class type, String filter, long timeout) {
         return getOsgiService(type, null, SERVICE_TIMEOUT);
     }
 
+    public Object getOsgiService(String type) {
+        return getOsgiService(type, null, SERVICE_TIMEOUT);
+    }
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public Object getOsgiService(String type, String filter, long timeout) {
+        ServiceTracker tracker = null;
+        try {
+            String flt;
+            if (filter != null) {
+                if (filter.startsWith("(")) {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type + ")" + filter + ")";
+                } else {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type + ")(" + filter + "))";
+                }
+            } else {
+                flt = "(" + Constants.OBJECTCLASS + "=" + type + ")";
+            }
+            Filter osgiFilter = FrameworkUtil.createFilter(flt);
+            tracker = new ServiceTracker(bundleContext, osgiFilter, null);
+            tracker.open(true);
+            // Note that the tracker is not closed to keep the reference
+            // This is buggy, as the service reference may change i think
+            Object svc = tracker.waitForService(timeout);
+            if (svc == null) {
+                Dictionary dic = bundleContext.getBundle().getHeaders();
+                System.err.println("Test bundle headers: " + explode(dic));
+
+                for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, null))) {
+                    System.err.println("ServiceReference: " + ref);
+                }
+
+                for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, flt))) {
+                    System.err.println("Filtered ServiceReference: " + ref);
+                }
+
+                throw new RuntimeException("Gave up waiting for service " + flt);
+            }
+            return svc;
+        } catch (InvalidSyntaxException e) {
+            throw new IllegalArgumentException("Invalid filter", e);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
     @SuppressWarnings({ "rawtypes", "unchecked" })
     public <T> T getOsgiService(Class<T> type, String filter, long timeout) {
         ServiceTracker tracker = null;
@@ -530,6 +581,14 @@ public String getSshPort() throws Exception {
         return "8101";
     }
 
+    public String getHttpPort() throws Exception {
+        org.osgi.service.cm.Configuration configuration = configurationAdmin.getConfiguration("org.ops4j.pax.web", null);
+        if (configuration != null) {
+            return configuration.getProperties().get("org.osgi.service.http.port").toString();
+        }
+        return "8181";
+    }
+
     public void assertFeatureInstalled(String featureName) throws Exception {
         String name;
         String version;
@@ -605,6 +664,13 @@ public void assertBundleNotInstalled(String name) {
         Assert.assertNull("Bundle " + name + " should not be installed", findBundleByName(name));
     }
 
+    public void installBundle(String bundleLocation, boolean start) throws Exception {
+        Bundle bundle = bundleContext.installBundle(bundleLocation);
+        if (start) {
+            bundle.start();
+        }
+    }
+
     public Bundle findBundleByName(String symbolicName) {
         for (Bundle bundle : bundleContext.getBundles()) {
             if (bundle.getSymbolicName().equals(symbolicName)) {
@@ -614,6 +680,10 @@ public Bundle findBundleByName(String symbolicName) {
         return null;
     }
 
+    public void addFeaturesRepository(String featuresRepository) throws Exception {
+        featureService.addRepository(new URI(featuresRepository));
+    }
+
     public void installAndAssertFeature(String feature) throws Exception {
         featureService.installFeature(feature, NO_AUTO_REFRESH);
         assertFeatureInstalled(feature);
diff --git a/itests/test/pom.xml b/itests/test/pom.xml
index 4aa45feee0..052e14da57 100644
--- a/itests/test/pom.xml
+++ b/itests/test/pom.xml
@@ -202,6 +202,53 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <!-- examples -->
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-bundle-example-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-bundle-example-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-blueprint-example-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-blueprint-example-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-command-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.diagnostic</groupId>
+            <artifactId>org.apache.karaf.diagnostic.boot</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jdbc-example-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-jpa-example-provider-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.examples</groupId>
+            <artifactId>karaf-rest-example-client-http</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/BlueprintExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/BlueprintExampleTest.java
new file mode 100644
index 0000000000..db6374d010
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/BlueprintExampleTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.examples.blueprint.client.ClientService;
+import org.apache.karaf.examples.blueprint.common.Booking;
+import org.apache.karaf.examples.blueprint.common.BookingService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import java.util.List;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class BlueprintExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // add blueprint example features repository
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-blueprint-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        // install the karaf-blueprint-example-provider feature
+        installAndAssertFeature("karaf-blueprint-example-provider");
+        // check the provider service
+        assertServiceAvailable(BookingService.class);
+
+        // install the karaf-blueprint-example-client feature
+        installAndAssertFeature("karaf-blueprint-example-client");
+
+        // get the client service
+        assertServiceAvailable(ClientService.class);
+        ClientService clientService = getOsgiService(ClientService.class);
+
+        // use the client service to manipulate the booking service
+        Booking booking = new Booking("Karaf Itest", "IT001");
+        clientService.addBooking(booking);
+        List<Booking> bookings = clientService.bookings();
+        boolean found = false;
+        for (Booking b : bookings) {
+            if (b.getCustomer().equals("Karaf Itest") && b.getFlight().equals("IT001")) {
+                found = true;
+                break;
+            }
+        }
+        Assert.assertTrue(found);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/BundleExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/BundleExampleTest.java
new file mode 100644
index 0000000000..4e59b8be0e
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/BundleExampleTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.examples.bundle.client.ClientService;
+import org.apache.karaf.examples.bundle.common.Booking;
+import org.apache.karaf.examples.bundle.common.BookingService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import java.util.List;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class BundleExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // add bundle example features repository
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-bundle-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        // install the karaf-bundle-example-provider feature
+        installAndAssertFeature("karaf-bundle-example-provider");
+        // check the provider service
+        assertServiceAvailable(BookingService.class);
+
+        // install the karaf-bundle-example-client feature
+        installAndAssertFeature("karaf-bundle-example-client");
+
+        // get the client service
+        assertServiceAvailable(ClientService.class);
+        ClientService clientService = getOsgiService(ClientService.class);
+
+        // use the client service to manipulate the booking service
+        Booking booking = new Booking("Karaf Itest", "IT001");
+        clientService.addBooking(booking);
+        List<Booking> bookings = clientService.bookings();
+        boolean found = false;
+        for (Booking b : bookings) {
+            if (b.getCustomer().equals("Karaf Itest") && b.getFlight().equals("IT001")) {
+                found = true;
+                break;
+            }
+        }
+        Assert.assertTrue(found);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/CommandExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/CommandExampleTest.java
new file mode 100644
index 0000000000..648f1a3922
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/CommandExampleTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.examples.command.api.BookingService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class CommandExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // add command example features repository
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-command-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        // install karaf-command-example-provider feature
+        installAndAssertFeature("karaf-command-example-provider");
+        assertServiceAvailable(BookingService.class);
+
+        // install karaf-command-example feature
+        installAndAssertFeature("karaf-command-example");
+
+        // execute booking commands
+        executeCommand("booking:add AF520 Foo");
+        String output = executeCommand("booking:list");
+        System.out.println(output);
+        assertContains("AF520", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/DeployerExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/DeployerExampleTest.java
new file mode 100644
index 0000000000..7cc3b7dda1
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/DeployerExampleTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.felix.fileinstall.ArtifactInstaller;
+import org.apache.felix.fileinstall.ArtifactListener;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class DeployerExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // install scr feature
+        installAndAssertFeature("scr");
+
+        // install deployer bundle
+        installBundle("mvn:org.apache.karaf.examples/karaf-deployer-example/" + System.getProperty("karaf.version"), true);
+
+        assertBundleInstalled("org.apache.karaf.examples.karaf-deployer-example");
+        assertServiceAvailable(ArtifactInstaller.class, "(component.name=org.apache.karaf.examples.deployer.ExampleDeployer)", 10);
+        assertServiceAvailable(ArtifactListener.class, "(component.name=org.apache.karaf.examples.deployer.ExampleDeployer)", 10);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/DumpExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/DumpExampleTest.java
new file mode 100644
index 0000000000..a53fc16bfe
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/DumpExampleTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.diagnostic.core.DumpProvider;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class DumpExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // install scr feature
+        installAndAssertFeature("scr");
+
+        // install the dump example bundle
+        installBundle("mvn:org.apache.karaf.examples/karaf-dump-example/" + System.getProperty("karaf.version"), true);
+        assertServiceAvailable(DumpProvider.class, "(component.name=org.apache.karaf.examples.dump.ScreenshotDumpProvider)", 10);
+
+        // create a dump
+        System.out.println(executeCommand("dev:dump-create"));
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JdbcExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JdbcExampleTest.java
new file mode 100644
index 0000000000..9d751f03ee
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JdbcExampleTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.examples.jdbc.api.BookingService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class JdbcExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // adding jdbc example features repository
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-jdbc-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        // install the karaf-jdbc-example-provider feature
+        installAndAssertFeature("karaf-jdbc-example-provider");
+        assertServiceAvailable(BookingService.class);
+
+        // install the karaf-jdbc-example feature
+        installAndAssertFeature("karaf-jdbc-example");
+
+        // add booking
+        executeCommand("booking:add Foo AF520");
+        // list booking
+        String bookings = executeCommand("booking:list");
+        System.out.println(bookings);
+        assertContains("AF520", bookings);
+        // get booking
+        String booking = executeCommand("booking:get 1");
+        System.out.println(booking);
+        assertContains("AF520", booking);
+        // remove booking
+        executeCommand("booking:remove 1");
+        bookings = executeCommand("booking:list");
+        System.out.println(bookings);
+        assertContainsNot("AF520", bookings);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java
new file mode 100644
index 0000000000..c0792dec1b
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.features.FeaturesService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.MavenUtils;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class JmsExampleTest extends KarafTestSupport {
+
+    private static final EnumSet<FeaturesService.Option> NO_AUTO_REFRESH = EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles);
+
+    @Configuration
+    public Option[] config() {
+        String version = MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf");
+        List<Option> result = new LinkedList<>(Arrays.asList(super.config()));
+        result.add(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresRepositories",
+                "mvn:org.apache.karaf.features/framework/" + version + "/xml/features, " +
+                        "mvn:org.apache.karaf.features/enterprise/" + version + "/xml/features, " +
+                        "mvn:org.apache.karaf.features/spring-legacy/" + version + "/xml/features, " +
+                        "mvn:org.apache.karaf.features/standard/" + version + "/xml/features, " +
+                        "mvn:org.apache.activemq/artemis-features/2.6.0/xml/features"
+        ));
+        result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg")));
+        if (JavaVersionUtil.getMajorVersion() >= 9) {
+            //need asm 6.x which support java9plus to run this test
+            result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/"
+                            + version + "/standard-" + version + "-features.xml",
+                    getConfigFile("/etc/feature.xml")));
+        }
+        return result.toArray(new Option[result.size()]);
+    }
+
+    @Test
+    public void test() throws Exception {
+        featureService.installFeature("aries-blueprint");
+
+        System.out.println("== Installing Artemis");
+        featureService.installFeature("artemis", NO_AUTO_REFRESH);
+        Thread.sleep(15000);//sleep a while ensure the jms broker is up
+        featureService.installFeature("jms", NO_AUTO_REFRESH);
+        featureService.installFeature("pax-jms-artemis", NO_AUTO_REFRESH);
+
+        String output = executeCommand("jms:info artemis");
+        System.out.println(output);
+        assertContains("ActiveMQ", output);
+
+        installBundle("mvn:org.apache.karaf.examples/karaf-jms-example-command/" + System.getProperty("karaf.version"), true);
+
+        executeCommand("example:send TEST FOO");
+
+        output = executeCommand("example:consume TEST");
+        System.out.println(output);
+        assertContains("FOO", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JpaExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JpaExampleTest.java
new file mode 100644
index 0000000000..74b51cc762
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JpaExampleTest.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.bundle.core.BundleService;
+import org.apache.karaf.examples.jpa.BookingService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.apache.karaf.jaas.boot.principal.RolePrincipal;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class JpaExampleTest extends KarafTestSupport {
+
+    private static final RolePrincipal[] ADMIN_ROLES = {
+            new RolePrincipal(BundleService.SYSTEM_BUNDLES_ROLE),
+            new RolePrincipal("admin"),
+            new RolePrincipal("manager")
+    };
+
+    @Test
+    public void test() throws Exception {
+        // adding jpa example features repository
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-jpa-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        // install the karaf-jpa-example-datasource & karaf-jpa-example-common
+        executeCommand("feature:install karaf-jpa-example-datasource", ADMIN_ROLES);
+        executeCommand("feature:install karaf-jpa-example-common", ADMIN_ROLES);
+
+        // declarative service EclipseLink
+        executeCommand("feature:install karaf-jpa-example-provider-ds-eclipselink", ADMIN_ROLES);
+        // install the karaf-jpa-example-command feature
+        installAndAssertFeature("karaf-jpa-example-command");
+        testCommand();
+        executeCommand("feature:uninstall karaf-jpa-example-provider-ds-eclipselink", ADMIN_ROLES);
+
+        // declarative service Hibernate
+        executeCommand("feature:install karaf-jpa-example-provider-ds-hibernate", ADMIN_ROLES);
+        testCommand();
+        executeCommand("feature:uninstall karaf-jpa-example-provider-ds-hibernate", ADMIN_ROLES);
+
+        // blueprint EclipseLink
+        executeCommand("feature:install karaf-jpa-example-provider-blueprint-eclipselink", ADMIN_ROLES);
+        testCommand();
+        executeCommand("feature:uninstall karaf-jpa-example-provider-blueprint-eclipselink", ADMIN_ROLES);
+
+        // blueprint Hibernate
+        executeCommand("feature:install karaf-jpa-example-provider-blueprint-hibernate", ADMIN_ROLES);
+        testCommand();
+        executeCommand("feature:uninstall karaf-jpa-example-provider-blueprint-hibernate", ADMIN_ROLES);
+    }
+
+    private void testCommand() {
+        // add booking
+        executeCommand("booking:add Foo AF520");
+        // list booking
+        String bookings = executeCommand("booking:list");
+        System.out.println(bookings);
+        assertContains("AF520", bookings);
+        // get booking
+        String booking = executeCommand("booking:get 1");
+        System.out.println(booking);
+        assertContains("AF520", booking);
+        // remove booking
+        executeCommand("booking:remove 1");
+        bookings = executeCommand("booking:list");
+        System.out.println(bookings);
+        assertContainsNot("AF520", bookings);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/LogAppenderExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/LogAppenderExampleTest.java
new file mode 100644
index 0000000000..e3c1d1aa18
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/LogAppenderExampleTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class LogAppenderExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        // adding karaf-log-appender-example features repository
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-log-appender-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        // install the karaf-log-appender-example feature
+        installAndAssertFeature("karaf-log-appender-example");
+
+        String output = executeCommand("log:log TEST");
+        System.out.println(output);
+        assertContains("INFO - TEST", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/MBeanExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/MBeanExampleTest.java
new file mode 100644
index 0000000000..1197ea12fc
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/MBeanExampleTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed 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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
+
+import javax.management.MBeanInfo;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import java.lang.management.ManagementFactory;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerMethod.class)
+public class MBeanExampleTest extends KarafTestSupport {
+
+    private void setup() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-mbean-example-features/" + System.getProperty("karaf.version") + "/xml");
+        installAndAssertFeature("karaf-mbean-example-provider");
+    }
+
+    private void checkMBean() throws Exception {
+        MBeanServerConnection connection = ManagementFactory.getPlatformMBeanServer();
+        ObjectName name = new ObjectName("org.apache.karaf.examples:type=booking,name=default");
+        MBeanInfo info = connection.getMBeanInfo(name);
+        Assert.assertNotNull(info);
+    }
+
+    @Test
+    public void testSimple() throws Exception {
+        setup();
+        installAndAssertFeature("karaf-mbean-example-simple");
+        checkMBean();
+    }
+
+    @Test
+    public void testBlueprint() throws Exception {
+        setup();
+        installAndAssertFeature("karaf-mbean-example-blueprint");
+        checkMBean();
+    }
+
+    @Test
+    public void testScr() throws Exception {
+        setup();
+        installAndAssertFeature("karaf-mbean-example-scr");
+        checkMBean();
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/NamespaceHandlerExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/NamespaceHandlerExampleTest.java
new file mode 100644
index 0000000000..4695c9c999
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/NamespaceHandlerExampleTest.java
@@ -0,0 +1,49 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.bundle.core.BundleService;
+import org.apache.karaf.itests.KarafTestSupport;
+import org.apache.karaf.jaas.boot.principal.RolePrincipal;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class NamespaceHandlerExampleTest extends KarafTestSupport {
+
+    private static final RolePrincipal[] ADMIN_ROLES = {
+            new RolePrincipal(BundleService.SYSTEM_BUNDLES_ROLE),
+            new RolePrincipal("admin"),
+            new RolePrincipal("manager")
+    };
+
+    @Test
+    public void test() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-url-namespace-handler-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        installAndAssertFeature("karaf-url-namespace-handler-example");
+
+        String output = executeCommand("bundle:install example:mvn:commons-lang/commons-lang/2.6", ADMIN_ROLES);
+        System.out.println(output);
+        assertContains("Thanks for using the Example URL !", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/RestExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/RestExampleTest.java
new file mode 100644
index 0000000000..9cd4f66484
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/RestExampleTest.java
@@ -0,0 +1,62 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerMethod.class)
+public class RestExampleTest extends KarafTestSupport {
+
+    private void setup() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-rest-example-features/" + System.getProperty("karaf.version") + "/xml");
+        installAndAssertFeature("karaf-rest-example-provider");
+    }
+
+    private void verify() throws Exception {
+        String location = "http://localhost:" + getHttpPort() + "/cxf/booking/";
+        executeCommand("booking:add --url " + location + " 1 Foo TST001");
+
+        String output = executeCommand("booking:list --url " + location);
+        System.out.println(output);
+        assertContains("TST001", output);
+    }
+
+    @Test
+    public void testWithHttpClient() throws Exception {
+        setup();
+
+        installAndAssertFeature("karaf-rest-example-client-http");
+
+        verify();
+    }
+
+    @Test
+    public void testWithCxfClient() throws Exception {
+        setup();
+
+        installAndAssertFeature("karaf-rest-example-client-cxf");
+
+        verify();
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/SchedulerExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/SchedulerExampleTest.java
new file mode 100644
index 0000000000..f1c40ddae7
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/SchedulerExampleTest.java
@@ -0,0 +1,40 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SchedulerExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-scheduler-example-features/" + System.getProperty("karaf.version") + "/xml");
+        installAndAssertFeature("karaf-scheduler-example");
+
+        String output = executeCommand("scheduler:list");
+        System.out.println(output);
+        assertContains("example", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/ScrExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/ScrExampleTest.java
new file mode 100644
index 0000000000..0e1a47f00b
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/ScrExampleTest.java
@@ -0,0 +1,45 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class ScrExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-scr-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        installAndAssertFeature("karaf-scr-example-client");
+
+        String output = executeCommand("scr:info BookingServiceMemoryImpl");
+        System.out.println(output);
+        assertContains("\"state\":32", output);
+
+        output = executeCommand("scr:info ConsoleClient");
+        System.out.println(output);
+        assertContains("\"state\":32", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java
new file mode 100644
index 0000000000..d06d0daeec
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/ServletExampleTest.java
@@ -0,0 +1,97 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerMethod.class)
+public class ServletExampleTest extends KarafTestSupport {
+
+    private void setup() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-servlet-example-features/" + System.getProperty("karaf.version") + "/xml");
+    }
+
+    private void verify() throws Exception {
+        String command = executeCommand("http:list");
+        System.out.println(command);
+        assertContains("servlet-example", command);
+
+        URL url = new URL("http://localhost:" + getHttpPort() + "/servlet-example");
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setRequestMethod("GET");
+        connection.setDoInput(true);
+
+        BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+        String line;
+        StringBuffer buffer = new StringBuffer();
+        while ((line = reader.readLine()) != null) {
+            buffer.append(line);
+        }
+
+        String output = buffer.toString();
+        System.out.println(output);
+        assertContains("<h1>Example Servlet</h1>", output);
+    }
+
+    @Test
+    public void testWithRegistration() throws Exception {
+        setup();
+
+        installAndAssertFeature("karaf-servlet-example-registration");
+
+        verify();
+    }
+
+    @Test
+    public void testWithAnnotation() throws Exception {
+        setup();
+
+        installAndAssertFeature("karaf-servlet-example-annotation");
+
+        verify();
+    }
+
+    @Test
+    public void testWithBlueprint() throws Exception {
+        setup();
+
+        installAndAssertFeature("karaf-servlet-example-blueprint");
+
+        verify();
+    }
+
+    @Test
+    public void testWithScr() throws Exception {
+        setup();
+
+        installAndAssertFeature("karaf-servlet-example-scr");
+
+        verify();
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/SoapExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/SoapExampleTest.java
new file mode 100644
index 0000000000..2e4d8c0e89
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/SoapExampleTest.java
@@ -0,0 +1,45 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SoapExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-soap-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        installAndAssertFeature("karaf-soap-example-provider");
+        installAndAssertFeature("karaf-soap-example-client");
+
+        String url = "http://localhost:" + getHttpPort() + "/cxf/example";
+        executeCommand("booking:add --url " + url + " 1 Foo TST001");
+
+        String output = executeCommand("booking:list --url " + url);
+        System.out.println(output);
+        assertContains("TST001", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/WarExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/WarExampleTest.java
new file mode 100644
index 0000000000..101d77713f
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/WarExampleTest.java
@@ -0,0 +1,64 @@
+/*
+ *  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.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class WarExampleTest extends KarafTestSupport {
+
+    @Test
+    public void test() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-war-example-features/" + System.getProperty("karaf.version") + "/xml");
+        installAndAssertFeature("karaf-war-example");
+
+        // give time to the webapp to deploy
+        Thread.sleep(2000);
+
+        String output = executeCommand("web:list");
+        System.out.println(output);
+        assertContains("example", output);
+
+        URL url = new URL("http://localhost:" + getHttpPort() + "/example");
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setRequestMethod("GET");
+        connection.setDoInput(true);
+
+        BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+        String line;
+        StringBuffer buffer = new StringBuffer();
+        while ((line = reader.readLine()) != null) {
+            buffer.append(line);
+        }
+
+        output = buffer.toString();
+        System.out.println(output);
+        assertContains("Hello World", output);
+    }
+
+}
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/features/StandardFeaturesTest.java b/itests/test/src/test/java/org/apache/karaf/itests/features/StandardFeaturesTest.java
index ef66667d93..ae6fc1d673 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/features/StandardFeaturesTest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/features/StandardFeaturesTest.java
@@ -25,9 +25,7 @@
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class StandardFeaturesTest extends KarafTestSupport {
-    
-   
-    
+
     @Test
     public void checkInstalledFeaturesBoot() throws Exception {
         System.out.println("===>checkInstalledFeaturesBoot");
diff --git a/manual/src/main/asciidoc/developer-guide/blueprint.adoc b/manual/src/main/asciidoc/developer-guide/blueprint.adoc
deleted file mode 100644
index 8ca2cafa26..0000000000
--- a/manual/src/main/asciidoc/developer-guide/blueprint.adoc
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Licensed 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.
-//
-
-=== Blueprint
\ No newline at end of file
diff --git a/manual/src/main/asciidoc/developer-guide/branding.adoc b/manual/src/main/asciidoc/developer-guide/branding.adoc
index 6a0873b8ed..9e96eab32e 100644
--- a/manual/src/main/asciidoc/developer-guide/branding.adoc
+++ b/manual/src/main/asciidoc/developer-guide/branding.adoc
@@ -58,118 +58,9 @@ In a similar way, a `etc/branding-ssh.properties` file can be added. It should c
 The values default to the ones in `etc/branding.properties` if this file is not defined.
 
 
-
 ==== Branding bundle
 
-At startup, Apache Karaf is looking for a bundle which exports the `org.apache.karaf.branding` package, containing
-a `branding.properties` and/or `branding-ssh.properties` file.
-
-Basically, a branding bundle is a very simple bundle, just containing a `org/apache/karaf/branding/branding.properties`
-file.
-
-It's easy to create such branding bundle using Apache Maven.
-
-The following `pom.xml` creates a branding bundle:
-
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>your.group.id</groupId>
-    <artifactId>your.branding.artifact.id</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Your Branding Bundle Name</name>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <version>2.4.0</version>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</bundle-SymbolicName>
-                        <Import-Package>*</Import-Package>
-                        <Private-Package>!*</Private-Package>
-                        <Export-Package>
-                            org.apache.karaf.branding
-                        </Export-Package>
-                        <Spring-Context>*;public-context:=false</Spring-Context>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
-----
-
-You can put your `branding.properties` file in the project resources (`src/main/resources/org/apache/karaf/branding/branding.properties`):
-
-----
-welcome = This is my Karaf brand\r\n
-prompt = Hey ${USER}>
-----
-
-For instance, the default Apache Karaf branding properties file contains:
-
-----
-welcome = \
-\u001B[36m        __ __                  ____      \u001B[0m\r\n\
-\u001B[36m       / //_/____ __________ _/ __/      \u001B[0m\r\n\
-\u001B[36m      / ,<  / __ `/ ___/ __ `/ /_        \u001B[0m\r\n\
-\u001B[36m     / /| |/ /_/ / /  / /_/ / __/        \u001B[0m\r\n\
-\u001B[36m    /_/ |_|\\__,_/_/   \\__,_/_/         \u001B[0m\r\n\
-\r\n\
-\u001B[1m  Apache Karaf\u001B[0m (${project.version})\r\n\
-\r\n\
-Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\r\n\
-   and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\r\n\
-Hit '\u001B[1m<ctrl-d>\u001B[0m' or type '\u001B[1msystem:shutdown\u001B[0m' or '\u001B[1mlogout\u001B[0m' to shutdown Karaf.\r\n
-----
-
-As you can see, the `branding.properties` contains two properties:
-
-* welcome is the welcome message displayed when you start Apache Karaf console.
-* prompt is the string used to display the console prompt. This string supports variables:
-** ${USER` defines the user name of the prompt. Caveat -- the user name is presently static and hardcoded to "karaf",
-however you can override here with your own static user name.
-** $`APPLICATION` defines the Karaf instance name.
-
-As you can see, both strings support ASCII escaped format. For instance \u001B[1m switches the foreground in bold
-and \u001B[0m switch back to normal.
-
-Some examples of customized prompt examples follow:
-
-----
-# Define a user with fancy colors
-prompt = \u001B[36mmy-karaf-user\u001B[0m\u001B[1m@\u001B[0m\u001B[34m${APPLICATION}\u001B[0m>
-----
-
-----
-# Static sober prompt
-prompt = my-user@my-karaf>
-----
-
-==== Installing the branding bundle
-
-Thanks to the `pom.xml`, we can use `mvn` to build the branding bundle:
-
-----
-mvn install
-----
-
-You just have to drop the file in the `lib` directory:
-
-----
-cp branding.jar /opt/apache-karaf-4.0.0/lib/karaf-branding.jar
-----
-
-You can now start Apache Karaf to see your branded console.
+See [https://github.com/apache/karaf/examples/karaf-branding-example/README.md].
 
 ==== WebConsole
 
diff --git a/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc b/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc
index d816421162..a0ebc36725 100644
--- a/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc
+++ b/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc
@@ -12,52 +12,13 @@
 // limitations under the License.
 //
 
-=== Basic bundle creation using the Felix maven-bundle-plugin
+=== Creating Bundles
 
-Create a bundle instead of a normal jar by using a Maven POM file like this:
+The examples provides different kind of bundles and services definition:
 
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>my.groupId</groupId>
-    <artifactId>my.bundle</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    <name>My Bundle</name>
-    <description>My bundle short description</description>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>${project.basedir}/src/main/resources</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <version>2.4.0</version>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        ...
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
-----
+* https://github.com/apache/karaf/examples/karaf-bundle-example/README.md
+* https://github.com/apache/karaf/examples/karaf-blueprint-example/README.md
+* https://github.com/apache/karaf/examples/karaf-scr-example/README.md
 
 ==== Add extended information to bundles
 
diff --git a/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc b/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc
index dfd50d47fa..d61e96ac2d 100644
--- a/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc
+++ b/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc
@@ -27,6 +27,8 @@ This custom distribution could contain:
 * renamed or specific scripts in the bin folder
 * system documentation files
 
+See [example/karaf-maven-example/karaf-maven-example-assembly] for a custom distribution example.
+
 ==== Maven assembly
 
 The recommended way to create a Karaf server assembly is to use the karaf-assembly packaging with the karaf-maven-plugin.
@@ -549,7 +551,6 @@ assembly descriptor, configured in POM above to be `src/main/descriptors/bin.xml
             <directory>target/dependencies/apache-karaf-${karaf.version}</directory>
             <outputDirectory>/</outputDirectory>
             <excludes>
-                <exclude>**/demos/**</exclude>
                 <exclude>bin/**</exclude>
                 <exclude>etc/system.properties</exclude>
                 <exclude>etc/users.properties</exclude>
diff --git a/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc b/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc
deleted file mode 100644
index 9e64e358da..0000000000
--- a/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Licensed 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.
-//
-
-=== CDI
\ No newline at end of file
diff --git a/manual/src/main/asciidoc/developer-guide/ds.adoc b/manual/src/main/asciidoc/developer-guide/ds.adoc
deleted file mode 100644
index af4086e067..0000000000
--- a/manual/src/main/asciidoc/developer-guide/ds.adoc
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Licensed 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.
-//
-
-=== Declarative Service (DS)
\ No newline at end of file
diff --git a/manual/src/main/asciidoc/developer-guide/extending.adoc b/manual/src/main/asciidoc/developer-guide/extending.adoc
index 1914c92500..994491614b 100644
--- a/manual/src/main/asciidoc/developer-guide/extending.adoc
+++ b/manual/src/main/asciidoc/developer-guide/extending.adoc
@@ -16,344 +16,12 @@
 
 Apache Karaf is a very flexible container that you can extend very easily.
 
-==== Console
+==== Shell commands
 
-In this section, you will see how to extend the console by adding your own command.
-
-We will leverage Apache Maven to create and build the OSGi bundle.
-This OSGi bundle will use Blueprint. We don't cover the details of OSGi bundle and Blueprint, see the specific
-sections for details.
-
-===== Create the Maven project
-
-To create the Maven project, we can:
-
-* use a Maven archetype
-* create by hand
-
-====== Using archetype
-
-The Maven Quickstart archetype can create an empty Maven project where you can put your project definition.
-
-You can directly use:
-
-----
-mvn archetype:generate \
-  -DarchetypeArtifactId=maven-archetype-quickstart \
-  -DgroupId=org.apache.karaf.shell.samples \
-  -DartifactId=shell-sample-commands \
-  -Dversion=1.0-SNAPSHOT
-----
-
-It results to a ready to use project, including a `pom.xml`.
-
-You can also use Maven archetype in interactive mode. You will have to answer to some questions used to generate
-the project with the `pom.xml`:
-
-----
-mvn archetype:generate
-Choose a number:  (1/2/3/4/5/6/7/.../32/33/34/35/36) 15: : 15
-Define value for groupId: : org.apache.karaf.shell.samples
-Define value for artifactId: : shell-sample-commands
-Define value for version:  1.0-SNAPSHOT: : 
-Define value for package: : org.apache.karaf.shell.samples
-----
-
-===== By hand
-
-Alternatively, you can simply create the directory `shell-sample-commands` and create the `pom.xml` file inside it:
-
-----
-<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>
-
-  <groupId>org.apache.karaf.shell.samples</groupId>
-  <artifactId>shell-sample-commands<artifactId>
-  <packaging>bundle</packaging>
-  <version>1.0-SNAPSHOT</version>
-  <name>shell-sample-commmands</name>
-
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.karaf.shell</groupId>
-      <artifactId>org.apache.karaf.shell.core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>${felix.plugin.version}</version>
-        <configuration>
-          <instructions>
-            <Import-Package>
-              org.apache.felix.service.command,
-              org.apache.karaf.shell.commands,
-              org.apache.karaf.shell.console,
-              *
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
-----
-
-===== Configuring for Java 8
-
-We are using annotations to define commands, so we need to ensure Maven will actually use JDK 1.6 or 1.7 to compile the jar.
-Just add the following snippet after the `dependencies` section.
-
-----
-<build>
-  <plugins>
-    <plugin>
-      <groupId>org.apache.maven.plugins</groupId>
-      <artifactId>maven-compiler-plugin</artifactId>
-      <configuration>
-        <target>1.8</target>
-        <source>1.8</source>
-      </configuration>
-    </plugin>
-  </plugins>
-</build>
-----
-
-===== Loading the project in your IDE
-
-We can use Maven to generate the needed files for your IDE:
-
-Inside the project, run the following command
-
-----
-mvn eclipse:eclipse
-----
-
-or
-
-----
-mvn idea:idea
-----
-
-The project files for your IDE should now be created.  Just open the IDE and load the project.
-
-===== Creating a basic command class
-
-We can now create the command class `HelloShellCommand.java`
-
-----
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "test", name = "hello", description="Says hello")
-@Service
-public class HelloShellCommand implements Action {
-
-    @Override
-    public Object execute() throws Exception {
-        System.out.println("Executing Hello command");
-        return null;
-    }
-}
-----
-
-===== Manifest
-
-In order for Karaf to find your command, you need to add the `Karaf-Commands=*` manifest header.
-
-This is usually done by modifying the maven bundle plugin configuration
-
-----
-<plugin>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>maven-bundle-plugin</artifactId>
-    <configuration>
-        <instructions>
-            <Karaf-Commands>*</Karaf-Commands>
-        </instructions>
-    </configuration>
-</plugin>
-----
-
-===== Compile
-
-Let's try to build the jar.  Remove the test classes and sample classes if you used the artifact, then from the command line, run:
-
-----
-mvn install
-----
-
-The end of the maven output should look like:
-
-----
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESSFUL
-[INFO] ------------------------------------------------------------------------
-----
-
-===== Test
-
-Launch Apache Karaf and install your bundle:
-
-----
-karaf@root()> bundle:install -s mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
-----
-
-Let's try running the command:
-
-----
-karaf@root()> test:hello
-Executing Hello command
-----
-
-===== Command completer
-
-A completer allows you to automatically complete a command argument using <tab>. A completer is simply a bean which is
-injected to a command.
-
-Of course to be able to complete it, the command should require an argument.
-
-===== Command argument
-
-We add an argument to the HelloCommand:
-
-----
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.Completion;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "test", name = "hello", description="Says hello")
-@Service
-public class HelloShellCommand implements Action {
-
-    @Argument(index = 0, name = "name", description = "The name that sends the greet.", required = true, multiValued = false)
-    @Completion(SimpleNameCompleter.class)
-    String name = null;
-
-    @Override
-    public Object execute() throws Exception {
-        System.out.println("Hello " + name);
-        return null;
-    }
-}
-----
-
-===== Completer bean
-
-A completer is a bean which implements the Completer interface:
-
-----
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.karaf.shell.api.console.CommandLine;
-import org.apache.karaf.shell.api.console.Completer;
-import org.apache.karaf.shell.api.console.Session;
-import org.apache.karaf.shell.support.completers.StringsCompleter;
-
-/**
- * <p>
- * A very simple completer.
- * </p>
- */
-@Service
-public class SimpleNameCompleter implements Completer {
-
-    public int complete(Session session, CommandLine commandLine, List<String> candidates) {
-        StringsCompleter delegate = new StringsCompleter();
-        delegate.getStrings().add("Mike");
-        delegate.getStrings().add("Eric");
-        delegate.getStrings().add("Jenny");
-        return delegate.complete(session, commandLine, candidates);
-    }
-
-}
-----
-
-===== Completers for option values
-
-Quite often your commands will not have just arguments, but also options. You can provide completers for option values.
-The snippet below shows the HelloShellCommand with an option to specify what the greet message will be.
-
-----
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.Completion;
-import org.apache.karaf.shell.api.action.Option;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "test", name = "hello", description="Says hello")
-@Service
-public class HelloShellCommand implements Action {
-
-    @Argument(index = 0, name = "name", description = "The name that sends the greet.", required = true, multiValued = false)
-    @Completion(SimpleNameCompleter.class)
-    String name = null;
-
-    @Option(name = "-g", aliases = "--greet", description = "The configuration pid", required = false, multiValued = false)
-    @Completion(GreetCompleter.class)
-    String greet = "Hello;
-
-    @Override
-    public Object execute() throws Exception {
-        System.out.println(greet + " " + name);
-        return null;
-    }
-}
-----
-
-===== Completers with state
-
-Some times we want to tune the behavior of the completer depending on the commands already executed, in the current shell
-or even the rest of the arguments that have been already passed to the command. Such example is the config:set-property
-command which will provide auto completion for only for the properties of the pid specified by a previously issued config:edit
-command or by the option --pid.
-
-The Session object provides map like methods for storing key/value pairs and can be used to put/get the state.
-The pre-parsed CommandLine objects allows you to check the previous arguments and options on the command line and to fine tune
-the behavior of the Completer.
-Those two objects are given to the Completer when calling the `complete` method.
-
-===== Test
-
-Launch a Karaf instance and run the following command to install the newly created bundle:
-
-----
-karaf@root()> bundle:install -s mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
-----
-
-Let's try running the command:
-
-----
-karaf@root> test:hello <tab>
- one    two    three
-----
+See [examples/karaf-command-example] to add your own shell commands.
 
 ==== WebConsole
 
 You can also extend the Apache Karaf WebConsole by providing and installing a webconsole plugin.
 
-A plugin is an OSGi bundle that register a Servlet as an OSGi service with some webconsole properties.
+A plugin is an OSGi bundle that register a Servlet as an OSGi service with webconsole properties.
diff --git a/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc b/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc
index 1965c9fafd..40701721a6 100644
--- a/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc
+++ b/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc
@@ -20,6 +20,8 @@ The Karaf Maven plugin allows you:
 * to create Karaf commands help: it generates help from Karaf commands
 * to modify Karaf instances and create distributions
 
+See [examples/karaf-maven-example] for details.
+
 ==== Packaging
 
 The most generally useful features of the karaf-maven-plugin are exposed as packagings.  To use the packagings the pom or an ancestor must configure the karaf-maven-plugin with extensions:
diff --git a/manual/src/main/asciidoc/developer-guide/services.adoc b/manual/src/main/asciidoc/developer-guide/services.adoc
deleted file mode 100644
index 55df2dca84..0000000000
--- a/manual/src/main/asciidoc/developer-guide/services.adoc
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Licensed 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.
-//
-
-=== OSGi Services
\ No newline at end of file
diff --git a/manual/src/main/asciidoc/developer-guide/writing-tests.adoc b/manual/src/main/asciidoc/developer-guide/writing-tests.adoc
index 1c950089f7..e0194cf4bc 100644
--- a/manual/src/main/asciidoc/developer-guide/writing-tests.adoc
+++ b/manual/src/main/asciidoc/developer-guide/writing-tests.adoc
@@ -14,357 +14,4 @@
 
 === Writing integration tests
 
-We recommend using http://team.ops4j.org/wiki/display/paxexam/Pax+Exam[PAX Exam] to write integration tests when developing applications using Karaf.
-
-Starting with Karaf 3.0 we've also included a component briding between Karaf and Pax Exam making it easier to write integration tests
-for Karaf or Karaf based distributions.
-
-==== Introduction
-
-Pax Exam directly supports Karaf as a test container.
-
-To make use of this new framework simply add the following dependencies into your integration tests pom.xml:
-
-----
-<dependency>
-  <groupId>org.ops4j.pax.exam</groupId>
-  <artifactId>pax-exam-container-karaf</artifactId>
-  <version>4.7.0</version>
-  <scope>test</scope>
-</dependency>
-<dependency>
-  <groupId>org.ops4j.pax.exam</groupId>
-  <artifactId>pax-exam-junit4</artifactId>
-  <version>4.7.0</version>
-  <scope>test</scope>
-</dependency>
-<dependency>
-  <groupId>org.apache.geronimo.specs</groupId>
-  <artifactId>geronimo-atinject-1.0_spec</artifactId>
-  <version>1.0</version>
-  <scope>test</scope>
-</dependency>
-----
-
-As a next step you need to reference the distribution you want to run your tests on.
-For instance, if you want to run your tests on Karaf the following section would be required in the integration tests pom.xml:
-
-----
-<dependency>
-  <groupId>org.apache.karaf</groupId>
-  <artifactId>apache-karaf</artifactId>
-  <version>4.0.0</version>
-  <type>tar.gz</type>
-  <scope>test</scope>
-</dependency>
-----
-
-If you want to make use of Exams "versionAsInProject" feature you also need to add the following section:
-
-----
-<build>
-  <plugins>
-    <plugin>
-      <groupId>org.apache.servicemix.tooling</groupId>
-      <artifactId>depends-maven-plugin</artifactId>
-      <version>1.2</version>
-      <executions>
-        <execution>
-          <id>generate-depends-file</id>
-          <goals>
-            <goal>generate-depends-file</goal>
-          </goals>
-        </execution>
-      </executions>
-    </plugin>
-  </plugins>
-</build>
-----
-
-With this done we can start writing our first test case:
-
-----
-import static junit.framework.Assert.assertTrue;
-import static org.ops4j.pax.exam.options.KarafDistributionOption.karafDistributionConfiguration;
-import static org.ops4j.pax.exam.CoreOptions.maven;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.ExamReactorStrategy;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
-
-@RunWith(JUnit4TestRunner.class)
-@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
-public class VersionAsInProjectKarafTest {
-
-    @Configuration
-    public Option[] config() {
-        return new Option[]{ karafDistributionConfiguration().frameworkUrl(
-            maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject())
-            .karafVersion("4.0.0").name("Apache Karaf")};
-    }
-
-    @Test
-    public void test() throws Exception {
-        assertTrue(true);
-    }
-}
-----
-
-==== Commands
-
-===== KarafDistributionConfigurationOption
-
-The framework itself is non of the typical runtimes you define normally in Pax-Exam.
-
-Instead you define a packed distribution as zip or tar.gz. Those distributions have to follow the Karaf packaging style.
-Therefore instead of Karaf you can also enter Servicemix or Geronimo.
-
-----
-new KarafDistributionConfigurationOption(
-  "mvn:org.apache.karaf/apache-karaf/4.0.0/zip", // artifact to unpack and use
-  "karaf", // name; display only
-  "4.0.0") // the karaf version; this one is relevant since the startup script differs between versions
-----
-
-or for Servicemix e.g.
-
-----
-new KarafDistributionConfigurationOption(
-  "mvn:org.apache.servicemix/apache-servicemix/4.4.0/zip", // artifact to unpack and use
-  "servicemix", // name; display only
-  "2.2.4") // the karaf version; this one is relevant since the startup script differs between versions
-----
-
-As an alternative you can also use the maven url resolvers.
-
-----
-...
-<dependency>
-  <groupId>org.apache.karaf</groupId>
-  <artifactId>apache-karaf</artifactId>
-  <type>zip</type>
-  <classifier>bin</classifier>
-  <scope>test</scope>
-</dependency>
-...
-<plugin>
-  <groupId>org.apache.servicemix.tooling</groupId>
-  <artifactId>depends-maven-plugin</artifactId>
-  <executions>
-    <execution>
-      <id>generate-depends-file</id>
-      <goals>
-        <goal>generate-depends-file</goal>
-      </goals>
-    </execution>
-  </executions>
-</plugin>
-----
-
-----
-@Configuration
-    public Option[] config() {
-        return new Option[]{ karafDistributionConfiguration().frameworkUrl(
-            maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip")
-                .classifier("bin").versionAsInProject()) };
-    }
-----
-
-In addition to the framework specification options this option also includes various additional configuration options.
-Those options are used to configure the internal properties of the runtime environment.
-
-====== Unpack Directory
-
-Pax-Exam Testframework extracts the distribution you specify by default into the paxexam config directory.
-If you would like to unpack them into your target directory simply extend the KarafDistributionConfigurationOption with the unpackDirectoryFile like shown in the next example:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip")
-        .unpackDirectory(new File("target/paxexam/unpack/")) };
-}
-----
-
-====== Use Deploy Folder
-
-Karaf distributions come by default with a deploy folder where you can simply drop artifacts to be deployed.
-In some distributions this folder might have been removed. To still be able to deploy your additional artifacts using
-default Pax Exam ProvisionOptions you can configure PaxExam Karaf to use a features.xml (which is directly added to
-your `etc/org.apache.karaf.features.cfg`) for those deploys. To use it instead of the deploy folder simply do the following:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip")
-        .useDeployFolder(false)) };
-}
-----
-
-===== KarafDistributionKitConfigurationOption
-
-The KarafDistributionKitConfigurationOption is almost equal to all variations of the KarafDistributionConfigurationOption
-with the exception that it requires to have set a platform and optionally the executable and the files which should be
-made executable additionally. By default it is bin/karaf for nix platforms and bin\karaf.bat for windows platforms.
-The executable option comes in handy if you like to e.g. embed an own java runtime. You should add a windows AND a
-linux Kit definition. The framework automatically takes the correct one then. The following shows a simple example for Karaf:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{
-        new KarafDistributionKitConfigurationOption("mvn:org.apache.karaf/apache-karaf/4.0.0/zip",
-            Platform.WINDOWS).executable("bin\\karaf.bat").filesToMakeExecutable("bin\\admin.bat"),
-        new KarafDistributionKitConfigurationOption("mvn:org.apache.karaf/apache-karaf/4.0.0/tar.gz", "karaf",
-            Platform.NIX).executable("bin/karaf").filesToMakeExecutable("bin/admin") };
-}
-----
-
-===== KarafDistributionConfigurationFilePutOption
-
-The option replaces or adds an option to one of Karaf's configuration files:
-
-----
-new KarafDistributionConfigurationFilePutOption(
-  "etc/config.properties", // config file to modify based on karaf.base
-  "karaf.framework", // key to add or change
-  "equinox") // value to add or change
-----
-
-This option could also be used in "batch-mode" via a property file. Therefore use the
-KarafDistributionOption#editConfigurationFilePut(final String configurationFilePath, File source, String... keysToUseFromSource) method.
-This option allows you to add all properties found in the file as KarafDistributionConfigurationFilePutOption. If you configure the "keysToUseFromSource" array only the keys specified there will be used. That way you can easily put an entire range of properties.
-
-===== KarafDistributionConfigurationFileExtendOption
-
-This one does the same as the KarafDistributionConfigurationFilePutOption option with the one difference that it either
-adds or appends a specific property. This is especially useful if you do not want to store the entire configuration in the line in your code.
-
-This option could also be extended in "batch-mode" via a property file. Therefore use the
-KarafDistributionOption#editConfigurationFileExtend(final String configurationFilePath, File source, String... keysToUseFromSource) method. This option allows you to extend all properties found in the file as KarafDistributionConfigurationFileExtendOption. If you configure the "keysToUseFromSource" array only the keys specified there will be used. That way you can easily extend an entire range of properties.
-
-===== KarafDistributionConfigurationFileReplacementOption
-
-The file replacement option allows you to simply replace a file in you Karaf distribution with a different file:
-
-----
-new KarafDistributionConfigurationFileReplacementOption("etc/tests.cfg", new File(
-    "src/test/resources/BaseKarafDefaultFrameworkDuplicatedPropertyEntryTestSecondKey"));
-----
-
-===== ProvisionOption
-
-The new test container fully supports the provision option. Feel free to use any option provided here by paxexam itself (e.g. Maven resolver).
-All those artifacts are copied into the deploy folder of your Karaf distribution before it is started. Therefore they all will be available after startup.
-
-===== KarafDistributionConfigurationConsoleOption
-
-The test container supports options to configure if the localConsole and/or the remote shell should be started. Possible options to do so are shown in the following two examples:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
-        configureConsole().ignoreLocalConsole().startRemoteShell() };
-}
-----
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
-        configureConsole().startLocalConsole(), configureConsole().ignoreRemoteShell() };
-}
-----
-
-===== VMOption
-
-The Karaf container passes the vmOptions now through to the Karaf environment. They are directly passed to the startup of the container.
-In addition the KarafDistributionOption helper has two methods (debugConfiguration() and debugConfiguration(String port, boolean hold)) to activate debugging quickly.
-
-===== LogLevelOption
-
-The Paxexam-Karaf specific log-level option allows an easy way to set a specific log-level for the Karaf based distribution. For example simply add the following to your Option[] array to get TRACE logging:
-
-----
-import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.logLevel;
-...
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
-        logLevel(LogLevel.TRACE) };
-}
-----
-
-===== DoNotModifyLogOption
-
-The option to modify the logging behavior requires that the container automatically modifies the logging configuration file.
-If you would like to suppress this behavior simply set the doNotModifyLogConfiguration option as shown in the next example:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
-        doNotModifyLogConfiguration() };
-}
-----
-
-===== KeepRuntimeFolderOption
-
-Per default the test container removes all test runner folders. If you want to keep them for any reasons (e.g. check why a test fails) set the following option:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
-        keepRuntimeFolder() };
-}
-----
-
-===== FeaturesScannerProvisionOption
-
-The FeaturesScannerProvisionOption (e.g. CoreOption.scanFeature()) are directly supported by the Paxexam Karaf Testframework.
-
-===== BootDelegationOption
-
-The BootDelegationOption as known from PaxExam is also supported added the boot delegation string directly into the correct property files.
-
-===== SystemPackageOption
-
-The Standard Exam SystemPackageOption is implemented by adding those packages to "org.osgi.framework.system.packages.extra" of the config.properties file.
-
-===== BootClasspathLibraryOption
-
-The BootClasspathLibraryOption is honored by copying the urls into the lib directory where they are automatically taken and worked on.
-
-===== ExamBundlesStartLevel
-
-The ExamBundlesStartLevel can be used to configure the start lvl of the bundles provided by the test-frameworks features.xml. Simply use it as a new option like:
-
-----
-@Configuration
-public Option[] config() {
-    return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
-            useOwnExamBundlesStartLevel(4) };
-}
-----
-
-==== Driver
-
-Drivers are the parts of the framework responsible for running the Karaf Based Distribution. By default the already in
-the overview explained KarafDistributionConfigurationOption uses a JavaRunner starting the distribution platform independent
-but not using the scripts in the distribution. If you like to test those scripts too an option is to to use the ScriptRunner via the KarafDistributionKitConfigurationOption instead.
-
-===== JavaRunner
-
-The JavaRunner builds the entire command itself and executes Karaf in a new JVM. This behavior is more or less exactly
-what the default runner does. Simply use the KarafDistributionConfigurationOption as explained in the Commands section to use this.
-
-===== ScriptRunner
-
-The script runner has the disadvantage over the java runner that it is also platform dependent.
-The advantage though is that you can also test your specific scripts. To use it follow the explanation of the KarafDistributionKitConfigurationOption in the Commands section.
+See [examples/karaf-itest-example/README.md]
\ No newline at end of file
diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc
index 14a49ec55c..12f0eea4a0 100644
--- a/manual/src/main/asciidoc/index.adoc
+++ b/manual/src/main/asciidoc/index.adoc
@@ -94,12 +94,6 @@ include::user-guide/tuning.adoc[]
 
 == Developer Guide
 
-[NOTE]
-====
-The developer guide is currently under a refactoring. The "new" developer guide will document samples providing
-in the Karaf Container distribution, in order to have more practical recipes.
-====
-
 include::developer-guide/developer-commands.adoc[]
 
 include::developer-guide/scripting.adoc[]
@@ -114,15 +108,15 @@ include::developer-guide/karaf-maven-plugin.adoc[]
 
 include::developer-guide/custom-distribution.adoc[]
 
-include::developer-guide/services.adoc[]
-
 include::developer-guide/creating-bundles.adoc[]
 
-include::developer-guide/blueprint.adoc[]
+==== Blueprint
 
-include::developer-guide/ds.adoc[]
+See https://github.com/apache/example/karaf-blueprint-example/README.md
 
-include::developer-guide/dev-cdi.adoc[]
+==== SCR
+
+See https://github.com/apache/example/karaf-scr-example/README.md
 
 include::developer-guide/archetypes.adoc[]
 
@@ -132,4 +126,54 @@ include::developer-guide/debugging.adoc[]
 
 include::developer-guide/writing-tests.adoc[]
 
+=== Dump extender
+
+See https://github.com/apache/karaf/examples/karaf-dump-example/README.md
+
+==== JDBC & JPA
+
+See https://github.com/apache/karaf/examples/karaf-jdbc-example/README.md
+
+See https://github.com/apache/karaf/examples/karaf-jpa-example/README.md
+
+==== JMS
+
+See https://github.com/apache/karaf/examples/karaf-jms-example/README.md
+
+==== Custom log appender
+
+See https://github.com/apache/karaf/examples/karaf-log-appender-example/README.md
+
+==== Custom JMX MBean
+
+See https://github.com/apache/karaf/examples/karaf-mbean-example/README.md
+
+==== Working with profiles
+
+See https://github.com/apache/karaf/examples/karaf-profile-example/README.md
+
+==== Servlet
+
+See https://github.com/apache/karaf/examples/karaf-servlet-example/README.md
+
+==== WAR
+
+See https://github.com/apache/karaf/examples/karaf-war-example/README.md
+
+==== REST service
+
+See https://github.com/apache/karaf/examples/karaf-rest-example/README.md
+
+==== SOAP service
+
+See https://github.com/apache/karaf/examples/karaf-soap-example/README.md
+
+==== Scheduling jobs
+
+See https://github.com/apache/karaf/examples/karaf-scheduler-example/README.md
+
+==== Custom URL handler
+
+See https://github.com/apache/karaf/examples/karaf-url-namespace-handler-example/README.md
+
 include::developer-guide/github-contributions.adoc[]
diff --git a/manual/src/main/asciidoc/user-guide/directory-structure.adoc b/manual/src/main/asciidoc/user-guide/directory-structure.adoc
index ec4e8fbb47..f44ec4222a 100644
--- a/manual/src/main/asciidoc/user-guide/directory-structure.adoc
+++ b/manual/src/main/asciidoc/user-guide/directory-structure.adoc
@@ -17,7 +17,7 @@
 The directory layout of a Karaf installation is as follows:
 
 * `/bin`: control scripts to start, stop, login, ...
-* `/demos`: contains some simple Karaf samples
+* `/examples`: contains several examples to start with Apache Karaf
 * `/etc`: configuration files
 * `/data`: working directory
 ** `/data/cache`: OSGi framework bundle cache
diff --git a/manual/src/main/asciidoc/user-guide/remote.adoc b/manual/src/main/asciidoc/user-guide/remote.adoc
index d78d465327..607153a8a1 100644
--- a/manual/src/main/asciidoc/user-guide/remote.adoc
+++ b/manual/src/main/asciidoc/user-guide/remote.adoc
@@ -390,7 +390,7 @@ lftp karaf@localhost:~> ls
 -rw-r--r--   1 jbonofre jbonofre   101041 Dec  3 05:34 RELEASE-NOTES.md
 drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 12:51 bin
 drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 18:57 data
-drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 12:51 demos
+drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 12:51 examples
 drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 13:02 deploy
 drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 17:59 etc
 drwxr-xr-x   1 jbonofre jbonofre     4096 Dec  3 13:02 instances
diff --git a/pom.xml b/pom.xml
index 2ffd214979..f259d12e2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
         <module>manual</module>
         <module>specs</module>
         <module>assemblies</module>
-        <module>demos</module>
+        <module>examples</module>
         <module>archetypes</module>
         <module>itests</module>
     </modules>
@@ -537,17 +537,6 @@
                 <version>${project.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>org.apache.karaf.demos</groupId>
-                <artifactId>demos</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.karaf.demos.profiles</groupId>
-                <artifactId>registry</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
             <dependency>
                 <groupId>org.apache.karaf.features</groupId>
                 <artifactId>org.apache.karaf.features.extension</artifactId>
@@ -728,11 +717,6 @@
                 <version>${project.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>org.apache.karaf.demos</groupId>
-                <artifactId>web</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.apache.karaf.tooling.exam</groupId>
                 <artifactId>org.apache.karaf.tooling.exam.container</artifactId>
diff --git a/profile/pom.xml b/profile/pom.xml
index e6dfb11894..7ac8756ba0 100644
--- a/profile/pom.xml
+++ b/profile/pom.xml
@@ -137,12 +137,6 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.karaf.demos.profiles</groupId>
-            <artifactId>registry</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/profile/src/test/java/org/apache/karaf/profile/assembly/BuilderTest.java b/profile/src/test/java/org/apache/karaf/profile/assembly/BuilderTest.java
index 44f059d512..e4e2f193ec 100644
--- a/profile/src/test/java/org/apache/karaf/profile/assembly/BuilderTest.java
+++ b/profile/src/test/java/org/apache/karaf/profile/assembly/BuilderTest.java
@@ -29,9 +29,7 @@
 import java.util.Map;
 
 import org.apache.karaf.features.internal.model.Features;
-import org.apache.karaf.features.internal.service.RepositoryCacheImpl;
 import org.apache.karaf.features.internal.service.RepositoryImpl;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.osgi.framework.Constants;
 
@@ -82,48 +80,6 @@ public void testPidsToExtract() {
         assertThat(builder.getPidsToExtract().get(2), equalTo("*"));
     }
 
-    @Test
-    @Ignore("This test can not run at this position as it needs the staticFramework kar which is not yet available")
-    public void testBuilder() throws Exception {
-
-        Path workDir = Paths.get("target/distrib");
-        recursiveDelete(workDir);
-
-        Builder builder = Builder.newInstance()
-                .staticFramework()
-                .profilesUris("jar:mvn:org.apache.karaf.demos.profiles/registry/4.0.0-SNAPSHOT!/")
-                .environment("static")
-                .profiles("karaf",
-                          "example-loanbroker-bank1",
-                          "example-loanbroker-bank2",
-                          "example-loanbroker-bank3",
-                          "example-loanbroker-broker",
-                          "activemq-broker")
-                .homeDirectory(workDir);
-
-        try {
-            builder.generateAssembly();
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw e;
-        }
-    }
-
-    //@Test
-    //@Ignore("no need to run this test")
-    public void consistencyReport() {
-        Map<String, Features> features = new LinkedHashMap<>();
-        Builder builder = new Builder();
-        File[] uris = new File("src/test/resources/repositories").listFiles((dir, name) -> name.endsWith(".xml"));
-        if (uris != null) {
-            for (File f : uris) {
-                features.put(f.getName(), new RepositoryImpl(f.toURI(), false).getFeaturesInternal());
-            }
-        }
-        builder.generateConsistencyReport(features, new File("target/consistency.xml"), false);
-        builder.generateConsistencyReport(features, new File("target/consistency-full.xml"), true);
-    }
-
     private static void recursiveDelete(Path path) throws IOException {
         if (Files.exists(path)) {
             if (Files.isDirectory(path)) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Review and update documentation
> -------------------------------
>
>                 Key: KARAF-2511
>                 URL: https://issues.apache.org/jira/browse/KARAF-2511
>             Project: Karaf
>          Issue Type: Task
>          Components: karaf-documentation
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Blocker
>             Fix For: 4.2.1
>
>
> The documentation (manual) should be reviewed:
> - The subshell part should be described (usage and configuration).
> - The "code samples"/screenshots have to be updated with Karaf 3.0.0 use cases
> - a global polishing, double read



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)