You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by cs...@apache.org on 2012/06/19 10:07:51 UTC

svn commit: r1351594 [1/2] - in /karaf/trunk: assemblies/ assemblies/apache-karaf/ assemblies/demos/ demos/ demos/branding/ demos/branding/src/main/filtered-resources/resources/demos/branding/shell/ demos/branding/src/main/resources/org/ demos/branding...

Author: cschneider
Date: Tue Jun 19 08:07:48 2012
New Revision: 1351594

URL: http://svn.apache.org/viewvc?rev=1351594&view=rev
Log:
KARAF-1559 Moving demos into normal modules. Adding the demo dirs to the karaf standard distro. Removing the demos from the distro dependencies to avoid adding feature files for the demos to the config.

Added:
    karaf/trunk/assemblies/demos/   (with props)
    karaf/trunk/assemblies/demos/pom.xml
    karaf/trunk/demos/branding/NOTICE
    karaf/trunk/demos/branding/README.txt
    karaf/trunk/demos/branding/src/main/resources/org/
    karaf/trunk/demos/branding/src/main/resources/org/apache/
    karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/
    karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/branding/
    karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties
    karaf/trunk/demos/command/NOTICE
    karaf/trunk/demos/command/README.txt
    karaf/trunk/demos/command/src/main/java/
    karaf/trunk/demos/command/src/main/java/org/
    karaf/trunk/demos/command/src/main/java/org/apache/
    karaf/trunk/demos/command/src/main/java/org/apache/karaf/
    karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/
    karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/
    karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java
    karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java
    karaf/trunk/demos/command/src/main/resources/OSGI-INF/
    karaf/trunk/demos/command/src/main/resources/OSGI-INF/blueprint/
    karaf/trunk/demos/command/src/main/resources/OSGI-INF/blueprint/mycommand.xml
    karaf/trunk/demos/deployer/bundle/   (with props)
    karaf/trunk/demos/deployer/bundle/NOTICE
    karaf/trunk/demos/deployer/bundle/README.TXT
    karaf/trunk/demos/deployer/bundle/pom.xml
    karaf/trunk/demos/deployer/bundle/src/
    karaf/trunk/demos/deployer/bundle/src/main/
    karaf/trunk/demos/deployer/bundle/src/main/java/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/
    karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java
    karaf/trunk/demos/deployer/kar/   (with props)
    karaf/trunk/demos/deployer/kar/NOTICE
    karaf/trunk/demos/deployer/kar/README.txt
    karaf/trunk/demos/deployer/kar/pom.xml
    karaf/trunk/demos/deployer/kar/src/
    karaf/trunk/demos/deployer/kar/src/main/
    karaf/trunk/demos/deployer/kar/src/main/resources/
    karaf/trunk/demos/deployer/kar/src/main/resources/features.xml
    karaf/trunk/demos/deployer/kar/src/main/resources/maven-metadata-local.xml
    karaf/trunk/demos/dump/NOTICE
    karaf/trunk/demos/dump/README.txt
    karaf/trunk/demos/dump/src/main/java/
    karaf/trunk/demos/dump/src/main/java/org/
    karaf/trunk/demos/dump/src/main/java/org/apache/
    karaf/trunk/demos/dump/src/main/java/org/apache/karaf/
    karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/
    karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/
    karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java
    karaf/trunk/demos/dump/src/main/resources/OSGI-INF/
    karaf/trunk/demos/dump/src/main/resources/OSGI-INF/blueprint/
    karaf/trunk/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml
    karaf/trunk/demos/web/NOTICE
    karaf/trunk/demos/web/README.txt
    karaf/trunk/demos/web/src/main/java/
    karaf/trunk/demos/web/src/main/java/org/
    karaf/trunk/demos/web/src/main/java/org/apache/
    karaf/trunk/demos/web/src/main/java/org/apache/karaf/
    karaf/trunk/demos/web/src/main/java/org/apache/karaf/web/
    karaf/trunk/demos/web/src/main/java/org/apache/karaf/web/WebAppListener.java
    karaf/trunk/demos/web/src/main/webapp/
    karaf/trunk/demos/web/src/main/webapp/WEB-INF/
    karaf/trunk/demos/web/src/main/webapp/WEB-INF/web.xml
    karaf/trunk/demos/web/src/main/webapp/index.jsp
Removed:
    karaf/trunk/demos/branding/src/main/filtered-resources/resources/demos/branding/shell/README.txt
    karaf/trunk/demos/branding/src/main/resources/resources/demos/branding/shell/NOTICE
    karaf/trunk/demos/branding/src/main/resources/resources/demos/branding/shell/pom.xml
    karaf/trunk/demos/branding/src/main/resources/resources/demos/branding/shell/src/
    karaf/trunk/demos/command/src/main/filtered-resources/
    karaf/trunk/demos/command/src/main/resources/resources/
    karaf/trunk/demos/deployer/src/
    karaf/trunk/demos/dump/src/main/filtered-resources/
    karaf/trunk/demos/dump/src/main/resources/resources/
    karaf/trunk/demos/web/src/main/filtered-resources/
    karaf/trunk/demos/web/src/main/resources/
Modified:
    karaf/trunk/assemblies/apache-karaf/pom.xml
    karaf/trunk/assemblies/pom.xml
    karaf/trunk/demos/branding/pom.xml
    karaf/trunk/demos/command/pom.xml
    karaf/trunk/demos/deployer/pom.xml
    karaf/trunk/demos/dump/pom.xml
    karaf/trunk/demos/pom.xml
    karaf/trunk/demos/web/pom.xml

Modified: karaf/trunk/assemblies/apache-karaf/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/assemblies/apache-karaf/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/assemblies/apache-karaf/pom.xml (original)
+++ karaf/trunk/assemblies/apache-karaf/pom.xml Tue Jun 19 08:07:48 2012
@@ -64,41 +64,6 @@
             <type>xml</type>
             <scope>runtime</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.demos</groupId>
-            <artifactId>org.apache.karaf.demos.branding</artifactId>
-            <version>${project.version}</version>
-            <type>kar</type>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.demos</groupId>
-            <artifactId>org.apache.karaf.demos.command.custom</artifactId>
-            <version>${project.version}</version>
-            <type>kar</type>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.demos</groupId>
-            <artifactId>org.apache.karaf.demos.deployer</artifactId>
-            <version>${project.version}</version>
-            <type>kar</type>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.demos</groupId>
-            <artifactId>org.apache.karaf.demos.dump</artifactId>
-            <version>${project.version}</version>
-            <type>kar</type>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.demos</groupId>
-            <artifactId>org.apache.karaf.demos.web</artifactId>
-            <version>${project.version}</version>
-            <type>kar</type>
-            <scope>runtime</scope>
-        </dependency>
     </dependencies>
 
     <build>
@@ -113,10 +78,38 @@
                     <include>NOTICE</include>
                 </includes>
             </resource>
+            <resource>
+                <directory>${project.build.directory}/demos</directory>
+                <filtering>false</filtering>
+            </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>
                 <executions>
                     <execution>
@@ -147,9 +140,9 @@
                         <configuration>
                             <artifacts>
                                 <artifact>
-                                  <file>src/main/resources/extra/jetty.xml</file>
-                                  <type>xml</type>
-                                  <classifier>jettyconfig</classifier>
+                                    <file>src/main/resources/extra/jetty.xml</file>
+                                    <type>xml</type>
+                                    <classifier>jettyconfig</classifier>
                                 </artifact>
                             </artifacts>
                         </configuration>

Propchange: karaf/trunk/assemblies/demos/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jun 19 08:07:48 2012
@@ -0,0 +1 @@
+target

Added: karaf/trunk/assemblies/demos/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/assemblies/demos/pom.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/assemblies/demos/pom.xml (added)
+++ karaf/trunk/assemblies/demos/pom.xml Tue Jun 19 08:07:48 2012
@@ -0,0 +1,60 @@
+<?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>3.0.0-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>
+                </excludes>
+            </resource>
+            <resource>
+                <directory>${project.basedir}/../../demos</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/README.txt</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+</project>

Modified: karaf/trunk/assemblies/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/assemblies/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/assemblies/pom.xml (original)
+++ karaf/trunk/assemblies/pom.xml Tue Jun 19 08:07:48 2012
@@ -35,6 +35,7 @@
 
     <modules>
         <module>features</module>
+        <module>demos</module>
         <module>apache-karaf-minimal</module>
         <module>apache-karaf</module>
     </modules>

Added: karaf/trunk/demos/branding/NOTICE
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/branding/NOTICE?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/branding/NOTICE (added)
+++ karaf/trunk/demos/branding/NOTICE Tue Jun 19 08:07:48 2012
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Added: karaf/trunk/demos/branding/README.txt
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/branding/README.txt?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/branding/README.txt (added)
+++ karaf/trunk/demos/branding/README.txt Tue Jun 19 08:07:48 2012
@@ -0,0 +1,69 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.

Modified: karaf/trunk/demos/branding/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/branding/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/demos/branding/pom.xml (original)
+++ karaf/trunk/demos/branding/pom.xml Tue Jun 19 08:07:48 2012
@@ -2,7 +2,6 @@
 <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.
@@ -25,27 +24,19 @@
         <groupId>org.apache.karaf.demos</groupId>
         <artifactId>demos</artifactId>
         <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>org.apache.karaf.demos.branding</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos :: Branding</name>
-
-    <modules>
-        <module>src/main/resources/resources/demos/branding/shell</module>
-        <!--<module>branding-package</module>-->
-    </modules>
+    <groupId>org.apache.karaf.demos</groupId>
+    <artifactId>org.apache.karaf.demos.branding.shell</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Demos :: Branding :: Shell</name>
+
     <build>
         <resources>
             <resource>
-                <directory>src/main/resources</directory>
-                <filtering>false</filtering>
-                <excludes>
-                    <exclude>**/target/**</exclude>
-                </excludes>
-            </resource>
-            <resource>
-                <directory>src/main/filtered-resources</directory>
+                <directory>${project.basedir}/src/main/resources</directory>
                 <filtering>true</filtering>
                 <includes>
                     <include>**/*</include>
@@ -54,49 +45,20 @@
         </resources>
         <plugins>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <!--<configuration>-->
-                    <!--<resources>-->
-                        <!--<resource>src/main/resources</resource>-->
-                    <!--</resources>-->
-                <!--</configuration>-->
-                <executions>
-                    <execution>
-                        <id>process-resources</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>resources</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-maven-plugin</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
-                    <startLevel>60</startLevel>
-                    <!--<checkDependencyChange>true</checkDependencyChange>-->
-                    <!--<overwriteChangedDependencies>true</overwriteChangedDependencies>-->
-                    <!--<failOnDependencyChange>false</failOnDependencyChange>-->
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Import-Package>*</Import-Package>
+                        <Private-Package>!*</Private-Package>
+                        <Export-Package>
+                            org.apache.karaf.branding
+                        </Export-Package>
+                    </instructions> 
                 </configuration>
-                <executions>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>features-generate-descriptor</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>package</id>
-                        <goals>
-                            <goal>features-create-kar</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
         </plugins>
     </build>
-</project>
+
+</project> 

Added: karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties (added)
+++ karaf/trunk/demos/branding/src/main/resources/org/apache/karaf/branding/branding.properties Tue Jun 19 08:07:48 2012
@@ -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.
+#
+################################################################################
+
+welcome = \
+\n\
+\u001B[1m  Apache Karaf Re-Branding Demo\u001B[0m (${pom.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
+

Added: karaf/trunk/demos/command/NOTICE
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/command/NOTICE?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/command/NOTICE (added)
+++ karaf/trunk/demos/command/NOTICE Tue Jun 19 08:07:48 2012
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Added: karaf/trunk/demos/command/README.txt
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/command/README.txt?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/command/README.txt (added)
+++ karaf/trunk/demos/command/README.txt Tue Jun 19 08:07:48 2012
@@ -0,0 +1,60 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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

Modified: karaf/trunk/demos/command/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/command/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/demos/command/pom.xml (original)
+++ karaf/trunk/demos/command/pom.xml Tue Jun 19 08:07:48 2012
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
-         http://maven.apache.org/xsd/maven-4.0.0.xsd">
+         http://maven.apache.org/maven-v4_0_0.xsd">
 
     <!--
 
@@ -13,7 +12,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,
@@ -28,78 +27,44 @@
         <groupId>org.apache.karaf.demos</groupId>
         <artifactId>demos</artifactId>
         <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>org.apache.karaf.demos.command.custom</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos :: Command </name>
-
-    <modules>
-        <module>src/main/resources/resources/demos/command</module>
-        <!--<module>branding-package</module>-->
-    </modules>
+    <artifactId>org.apache.karaf.demos.command</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Demos :: Command :: Extend Console</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
     <build>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>false</filtering>
-                <excludes>
-                    <exclude>**/target/**</exclude>
-                </excludes>
-            </resource>
-            <resource>
-                <directory>src/main/filtered-resources</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
         <plugins>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <!--<configuration>-->
-                    <!--<resources>-->
-                        <!--<resource>src/main/resources</resource>-->
-                    <!--</resources>-->
-                <!--</configuration>-->
-                <executions>
-                    <execution>
-                        <id>process-resources</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>resources</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-maven-plugin</artifactId>
-                <version>${project.version}</version>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.3.6</version>
                 <configuration>
-                    <startLevel>60</startLevel>
-                    <!--<checkDependencyChange>true</checkDependencyChange>-->
-                    <!--<overwriteChangedDependencies>true</overwriteChangedDependencies>-->
-                    <!--<failOnDependencyChange>false</failOnDependencyChange>-->
+                    <instructions>
+                        <Import-Package>
+                            org.apache.felix.service.command,
+                            org.apache.karaf.shell.commands,
+                            org.apache.karaf.shell.console,
+                            *
+                        </Import-Package>
+                    </instructions>
                 </configuration>
-                <executions>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>features-generate-descriptor</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>package</id>
-                        <goals>
-                            <goal>features-create-kar</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
         </plugins>
     </build>
+
 </project>

Added: karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java (added)
+++ karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCommand.java Tue Jun 19 08:07:48 2012
@@ -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.demos.command;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+
+@Command(scope = "mycommand", name = "hello", description="Says hello")
+public class MyCommand extends OsgiCommandSupport {
+
+    @Argument(index = 0, name = "arg", description = "The command argument", required = false, multiValued = false)
+    String arg = null;
+
+    @Override
+    protected Object doExecute() throws Exception {
+        System.out.println("Executing My Command Demo");
+        return null;
+    }
+}

Added: karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java (added)
+++ karaf/trunk/demos/command/src/main/java/org/apache/karaf/demos/command/MyCompleter.java Tue Jun 19 08:07:48 2012
@@ -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.demos.command;
+
+import org.apache.karaf.shell.console.completer.StringsCompleter;
+import org.apache.karaf.shell.console.Completer;
+
+import java.util.List;
+
+/**
+* <p>
+* My completer.
+* </p>
+*/
+
+public class MyCompleter implements Completer {
+
+    /**
+     * @param buffer it's the beginning string typed by the user
+     * @param cursor it's the position of the cursor
+     * @param candidates the list of completions proposed to the user
+     */
+    public int complete(String buffer, int cursor, List candidates) {
+
+        StringsCompleter delegate = new StringsCompleter();
+        delegate.getStrings().add("one");
+        delegate.getStrings().add("two");
+        delegate.getStrings().add("three");
+        return delegate.complete(buffer, cursor, candidates);
+    }
+}

Added: karaf/trunk/demos/command/src/main/resources/OSGI-INF/blueprint/mycommand.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/command/src/main/resources/OSGI-INF/blueprint/mycommand.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/command/src/main/resources/OSGI-INF/blueprint/mycommand.xml (added)
+++ karaf/trunk/demos/command/src/main/resources/OSGI-INF/blueprint/mycommand.xml Tue Jun 19 08:07:48 2012
@@ -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.
+
+-->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.apache.karaf.demos.command.MyCommand"/>
+            <completers>
+                <ref component-id="myCompleter"/>
+                <null/>
+            </completers>
+        </command>
+    </command-bundle>
+
+    <bean id="myCompleter" class="org.apache.karaf.demos.command.MyCompleter"/>
+
+</blueprint>

Propchange: karaf/trunk/demos/deployer/bundle/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jun 19 08:07:48 2012
@@ -0,0 +1 @@
+target

Added: karaf/trunk/demos/deployer/bundle/NOTICE
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/bundle/NOTICE?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/bundle/NOTICE (added)
+++ karaf/trunk/demos/deployer/bundle/NOTICE Tue Jun 19 08:07:48 2012
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010-2012 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Added: karaf/trunk/demos/deployer/bundle/README.TXT
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/bundle/README.TXT?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/bundle/README.TXT (added)
+++ karaf/trunk/demos/deployer/bundle/README.TXT Tue Jun 19 08:07:48 2012
@@ -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.
+ */
+
+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

Added: karaf/trunk/demos/deployer/bundle/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/bundle/pom.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/bundle/pom.xml (added)
+++ karaf/trunk/demos/deployer/bundle/pom.xml Tue Jun 19 08:07:48 2012
@@ -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.demos</groupId>
+        <artifactId>demos</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../../../../../../../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.karaf.demos.deployer.bundle</groupId>
+    <artifactId>my-bundle</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Karaf :: Demos :: Deployer :: Bundle</name>
+    <description>Apache Karaf bundle demo.</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.3.7</version>
+                <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>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java (added)
+++ karaf/trunk/demos/deployer/bundle/src/main/java/org/apache/karaf/demos/deployer/bundle/Activator.java Tue Jun 19 08:07:48 2012
@@ -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.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");
+    }
+
+}

Propchange: karaf/trunk/demos/deployer/kar/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jun 19 08:07:48 2012
@@ -0,0 +1 @@
+target

Added: karaf/trunk/demos/deployer/kar/NOTICE
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/kar/NOTICE?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/kar/NOTICE (added)
+++ karaf/trunk/demos/deployer/kar/NOTICE Tue Jun 19 08:07:48 2012
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Added: karaf/trunk/demos/deployer/kar/README.txt
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/kar/README.txt?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/kar/README.txt (added)
+++ karaf/trunk/demos/deployer/kar/README.txt Tue Jun 19 08:07:48 2012
@@ -0,0 +1,72 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 creates a repository dedicated to your kar 
+(in the $/local-repo) and register the features descriptor.
+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

Added: karaf/trunk/demos/deployer/kar/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/kar/pom.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/kar/pom.xml (added)
+++ karaf/trunk/demos/deployer/kar/pom.xml Tue Jun 19 08:07:48 2012
@@ -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.demos</groupId>
+        <artifactId>demos</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../../../../../../../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.karaf.demos</groupId>
+    <artifactId>my-kar</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Apache Karaf :: Demos :: Deployer :: Kar</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.2.1</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <version>3.0.0-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>package</id>
+                        <goals>
+                            <goal>features-create-kar</goal>
+                        </goals>
+                        <configuration>
+                            <featuresFile>src/main/resources/features.xml</featuresFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: karaf/trunk/demos/deployer/kar/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/kar/src/main/resources/features.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/kar/src/main/resources/features.xml (added)
+++ karaf/trunk/demos/deployer/kar/src/main/resources/features.xml Tue Jun 19 08:07:48 2012
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<features>
+
+    <feature name="my-kar" version="1.0">
+        <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>
+    </feature>
+
+</features>

Added: karaf/trunk/demos/deployer/kar/src/main/resources/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/kar/src/main/resources/maven-metadata-local.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/deployer/kar/src/main/resources/maven-metadata-local.xml (added)
+++ karaf/trunk/demos/deployer/kar/src/main/resources/maven-metadata-local.xml Tue Jun 19 08:07:48 2012
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+  <groupId>org.apache.karaf.demos</groupId>
+  <artifactId>my-kar</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <localCopy>true</localCopy>
+    </snapshot>
+    <lastUpdated>20120618135212</lastUpdated>
+    <snapshotVersions>
+      <snapshotVersion>
+        <classifier>features</classifier>
+        <extension>xml</extension>
+        <value>1.0.0-SNAPSHOT</value>
+        <updated>20120618135212</updated>
+      </snapshotVersion>
+    </snapshotVersions>
+  </versioning>
+</metadata>

Modified: karaf/trunk/demos/deployer/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/deployer/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/demos/deployer/pom.xml (original)
+++ karaf/trunk/demos/deployer/pom.xml Tue Jun 19 08:07:48 2012
@@ -35,71 +35,7 @@
     <name>Apache Karaf :: Demos :: Deployer</name>
 
     <modules>
-        <module>src/main/resources/resources/demos/deployer/kar</module>
-        <module>src/main/resources/resources/demos/deployer/bundle</module>
+        <module>kar</module>
+        <module>bundle</module>
     </modules>
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>false</filtering>
-                <excludes>
-                    <exclude>**/target/**</exclude>
-                </excludes>
-            </resource>
-            <resource>
-                <directory>src/main/filtered-resources</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <!--<configuration>-->
-                    <!--<resources>-->
-                        <!--<resource>src/main/resources</resource>-->
-                    <!--</resources>-->
-                <!--</configuration>-->
-                <executions>
-                    <execution>
-                        <id>process-resources</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>resources</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-maven-plugin</artifactId>
-                <version>${project.version}</version>
-                <configuration>
-                    <startLevel>60</startLevel>
-                    <!--<checkDependencyChange>true</checkDependencyChange>-->
-                    <!--<overwriteChangedDependencies>true</overwriteChangedDependencies>-->
-                    <!--<failOnDependencyChange>false</failOnDependencyChange>-->
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>features-generate-descriptor</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>package</id>
-                        <goals>
-                            <goal>features-create-kar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
 </project>

Added: karaf/trunk/demos/dump/NOTICE
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/dump/NOTICE?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/dump/NOTICE (added)
+++ karaf/trunk/demos/dump/NOTICE Tue Jun 19 08:07:48 2012
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010-2012 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Added: karaf/trunk/demos/dump/README.txt
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/dump/README.txt?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/dump/README.txt (added)
+++ karaf/trunk/demos/dump/README.txt Tue Jun 19 08:07:48 2012
@@ -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.
+ */
+
+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.

Modified: karaf/trunk/demos/dump/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/dump/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/demos/dump/pom.xml (original)
+++ karaf/trunk/demos/dump/pom.xml Tue Jun 19 08:07:48 2012
@@ -1,105 +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.demos</groupId>
-        <artifactId>demos</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>org.apache.karaf.demos.dump</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Karaf :: Demos :: Demo Dump provider</name>
-
-    <modules>
-        <module>src/main/resources/resources/demos/dump</module>
-        <!--<module>branding-package</module>-->
-    </modules>
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <filtering>false</filtering>
-                <excludes>
-                    <exclude>**/target/**</exclude>
-                </excludes>
-            </resource>
-            <resource>
-                <directory>src/main/filtered-resources</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <!--<configuration>-->
-                    <!--<resources>-->
-                        <!--<resource>src/main/resources</resource>-->
-                    <!--</resources>-->
-                <!--</configuration>-->
-                <executions>
-                    <execution>
-                        <id>process-resources</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>resources</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-maven-plugin</artifactId>
-                <version>${project.version}</version>
-                <configuration>
-                    <startLevel>60</startLevel>
-                    <!--<checkDependencyChange>true</checkDependencyChange>-->
-                    <!--<overwriteChangedDependencies>true</overwriteChangedDependencies>-->
-                    <!--<failOnDependencyChange>false</failOnDependencyChange>-->
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>features-generate-descriptor</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>package</id>
-                        <goals>
-                            <goal>features-create-kar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
+<?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>3.0.0-SNAPSHOT</version>
+        <relativePath>../../../../../../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>dump</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Demos :: Demo Dump provider</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.diagnostic</groupId>
+            <artifactId>org.apache.karaf.diagnostic.core</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <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>

Added: karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java (added)
+++ karaf/trunk/demos/dump/src/main/java/org/apache/karaf/diagnostic/demo/ScreenshotDumpProvider.java Tue Jun 19 08:07:48 2012
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT 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();
+        }
+
+    }
+
+}

Added: karaf/trunk/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml (added)
+++ karaf/trunk/demos/dump/src/main/resources/OSGI-INF/blueprint/screenshot.xml Tue Jun 19 08:07:48 2012
@@ -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.
+
+-->
+<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

Modified: karaf/trunk/demos/pom.xml
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/pom.xml?rev=1351594&r1=1351593&r2=1351594&view=diff
==============================================================================
--- karaf/trunk/demos/pom.xml (original)
+++ karaf/trunk/demos/pom.xml Tue Jun 19 08:07:48 2012
@@ -38,9 +38,7 @@
         <module>branding</module>
         <module>command</module>
         <module>dump</module>
-        <!-- Disabling this for the moment as the build fails at the my-kar.pom 
         <module>deployer</module>
-        -->
     </modules>
 
 </project>

Added: karaf/trunk/demos/web/NOTICE
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/web/NOTICE?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/web/NOTICE (added)
+++ karaf/trunk/demos/web/NOTICE Tue Jun 19 08:07:48 2012
@@ -0,0 +1,48 @@
+Apache Karaf
+Copyright 2010-2012 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+This product includes software written by
+Antony Lesuisse.
+Licensed under Public Domain.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2010).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+OPS4J (http://www.ops4j.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+FUSE Source (http://www.fusesource.org/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+Tanuki Software (http://www.tanukisoftware.com/).
+Licensed under the Apache License 2.0.
+
+This product uses software developed at
+JLine (http://jline.sourceforge.net).
+Licensed under the BSD License.
+
+This product uses software developed at
+SLF4J (http://www.slf4j.org/).
+Licensed under the MIT License.
+
+This product includes software from http://www.json.org.
+Copyright (c) 2002 JSON.org
+
+
+III. License Summary
+- Apache License 2.0

Added: karaf/trunk/demos/web/README.txt
URL: http://svn.apache.org/viewvc/karaf/trunk/demos/web/README.txt?rev=1351594&view=auto
==============================================================================
--- karaf/trunk/demos/web/README.txt (added)
+++ karaf/trunk/demos/web/README.txt Tue Jun 19 08:07:48 2012
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 WEB APPLICATION
+====================================
+
+Purpose
+-------
+To embed Karaf in a web application.
+
+
+Prerequisites for Running the Example
+-------------------------------------
+You must have the following installed on your machine:
+
+  - JDK 1.6 or higher
+
+  - Maven 3.0.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 Web Container
+  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.