You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2015/07/01 19:06:45 UTC
svn commit: r1688692 [16/30] - in
/karaf/site/production/manual/latest-3.0.x: ./ commands/ css/ css/scalate/
developers-guide/ images/ users-guide/
Added: karaf/site/production/manual/latest-3.0.x/developers-guide/branding.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest-3.0.x/developers-guide/branding.html?rev=1688692&view=auto
==============================================================================
--- karaf/site/production/manual/latest-3.0.x/developers-guide/branding.html (added)
+++ karaf/site/production/manual/latest-3.0.x/developers-guide/branding.html Wed Jul 1 17:06:42 2015
@@ -0,0 +1,285 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="description" content="description goes here"/>
+ <meta name="keywords" content="keywords,goes,here"/>
+ <meta name="author" content="The Apache Karaf Team"/>
+ <link href="../css/style.css" rel="stylesheet" type="text/css"/>
+ <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
+ <title>
+ Apache Karaf 3.0.5-SNAPSHOT Guides
+ </title>
+ </head>
+ <body>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr width="100%">
+ <td id="cell-0-0" colspan="2">
+
+ </td>
+ <td id="cell-0-1">
+
+ </td>
+ <td id="cell-0-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-1-0">
+
+ </td>
+ <td id="cell-1-1">
+
+ </td>
+ <td id="cell-1-2">
+ <div style="padding: 5px;">
+ <div id="banner">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td align="left" class="topbardiv" nowrap="">
+<a href="http://karaf.apache.org/" title="A server side OSGi distribution">
+ <img border="0" src="../images/karaf-logo.png" width="400px"></img>
+</a>
+ </td>
+ <td align="right" nowrap="">
+<a href="http://www.apache.org/" title="The Apache Sofware Foundation">
+ <img border="0" src="../images/asf-logo.png">
+</a>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="top-menu">
+ <table border="0" cellpadding="1" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <div align="left"></div>
+ </td>
+ <td>
+ <div align="right">
+ <p>
+<a href="../index.html" title="Home">Home</a>
+|
+<a href="../users-guide/index.html" title="Users Guide">Users Guide</a>
+|
+<a href="index.html" title="Developers Guide">Developers Guide</a>
+</p>
+
+
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td id="cell-1-3">
+
+ </td>
+ <td id="cell-1-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-2-0" colspan="2">
+
+ </td>
+ <td id="cell-2-1">
+ <table>
+ <tr height="100%" valign="top">
+ <td height="100%">
+ <div id="wrapper-menu-page-right">
+ <div id="wrapper-menu-page-top">
+ <div id="wrapper-menu-page-bottom">
+ <div id="menu-page">
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="../users-guide/index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="../users-guide/installation.html">Installation</a></li><li><a href="../users-guide/directory-structure.html">Directory structure</a></li><li><a href="../users-guide/start-stop.html">Start, stop, restart, connect</a></li><li><a href="../users-guide/wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="../users-guide/console.html">Console</a></li><li><a href="../users-guide/remote.html">Remote</a></li><li><a href="../users-guide/log.html">Log</a></li><li><a href="../users-guide/configuration.html">Configuration</a></li><li><a href="../users-guide/urls.html">Artifacts repositories and URLs</a></li><li>
<a href="../users-guide/provisioning.html">Provisioning and features</a></li><li><a href="../users-guide/deployers.html">Deployers</a></li><li><a href="../users-guide/kar.html">KAR</a></li><li><a href="../users-guide/instances.html">Instances</a></li><li><a href="../users-guide/security.html">Security</a></li><li><a href="../users-guide/obr.html">OBR</a></li><li><a href="../users-guide/enterprise.html">Enterprise</a><ul><li><a href="../users-guide/webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="../users-guide/jndi.html">Naming (JNDI)</a></li><li><a href="../users-guide/jta.html">Transaction (JTA)</a></li><li><a href="../users-guide/jdbc.html">DataSource (JDBC)</a></li><li><a href="../users-guide/jms.html">MOM (JMS)</a></li><li><a href="../users-guide/jpa.html">Persistence (JPA)</a></li><li><a href="../users-guide/ejb.html">EJB</a></li><li><a href="../users-guide/cdi.html">CDI</a></li><li><a href="../users-guide/failover.html">HA/failover and cluster</a></li></ul><
/li><li><a href="../users-guide/monitoring.html">Monitoring and Management using JMX</a></li><li><a href="../users-guide/webconsole.html">WebConsole</a></li><li><a href="../users-guide/tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="developer-commands.html">Developer commands</a></li><li><a href="scripting.html">Scripting</a></li><li><a href="connect.html">Programmatically connect</a></li><li><a href="branding.html">Branding</a></li><li><a href="extending.html">Extending</a></li><li><a href="karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="custom-distribution.html">Custom distribution</a></li><li><a href="services.html">OSGi services</a></li><li><a href="creating-bundles.html">Create OSGi bundle</a></li><li><a href="blueprint.html">Blueprint</a></li><li><a href="cdi.html">CDI</a></li><li><a href="archetypes.html">Maven Archetypes</a></li><li><a href
="security-framework.html">Security Framework</a></li><li><a href="debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a href="writing-tests.html">Integration testing</a></li><li><a href="github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td height="100%" width="100%">
+ <div class="wiki-content">
+<h1 id="Branding">Branding</h1><h2 id="Console">Console</h2><p>You can "brand" the Apache Karaf console.</p><p>By branding, it means that you can define your own:</p><ul><li>the welcome message (motd or Message Of The Day) displayed when you start the console</li><li>the prompt displayed to the users</li></ul><p>There are 2 ways of branding the Karaf console: (1) adding a branding.properties file to etc, and (2) creating a branding bundle.</p><h2 id="Addingabranding.propertiesfiletoetc">Adding a branding.properties file to etc</h2><p>Create a <tt>etc/branding.properties</tt> file similar to:</p><p>{</p><pre>}
+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 (3.0.5-SNAPSHOT)\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 '\u001B[1mosgi:shutdown\u001B[0m' to shutdown Karaf.\r\n
+
+prompt = \u001B[1m${USER}@${APPLICATION}\u001B[0m>
+{
+</pre><p>}</p><p>Start Karaf and you will see your branded Karaf console.</p><h2 id="Brandingbundle">Branding bundle</h2><p>At startup, Apache Karaf is looking for a bundle which exports the <tt>org.apache.karaf.branding</tt> package, containing<br/>a <tt>branding.properties</tt> file.</p><p>Basically, a branding bundle is a very simple bundle, just containing a <tt>org/apache/karaf/branding/branding.properties</tt><br/>file.</p><p>It's easy to create such branding bundle using Apache Maven.</p><p>The following <tt>pom.xml</tt> creates a branding bundle:</p><pre>
+<?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>manual</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>
+</pre><p>You can put your <tt>branding.properties</tt> file in the project resources (<tt>src/main/resources/org/apache/karaf/branding/branding.properties</tt>):</p><pre>
+welcome = This is my Karaf brand\r\n
+prompt = Hey ${USER}>
+</pre><p>For instance, the default Apache Karaf branding properties file contains:</p><pre>
+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 (3.0.5-SNAPSHOT)\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
+</pre><p>As you can see, the <tt>branding.properties</tt> contains two properties:</p><ul><li>welcome is the welcome message displayed when you start Apache Karaf console.</li><li>prompt is the string used to display the console prompt. This string supports variables:<ul><li>$} defines the user name of the prompt. Caveat – the user name is presently static and hardcoded to "karaf",<p>however you can override here with your own static user name.</p></li><li>${{APPLICATION}} defines the Karaf instance name.</li></ul></li></ul><p>As you can see, both strings support ASCII escaped format. For instance \u001B[1m switches the foreground in bold<br/>and \u001B[0m switch back to normal.</p><p>Some examples of customized prompt examples follow:</p><pre>
+# Define a user with fancy colors
+prompt = \u001B[36mmy-karaf-user\u001B[0m\u001B[1m@\u001B[0m\u001B[34m${APPLICATION}\u001B[0m>
+</pre><pre>
+# Static sober prompt
+prompt = my-user@my-karaf>
+</pre><h2 id="Installingthebrandingbundle">Installing the branding bundle</h2><p>Thanks to the <tt>pom.xml</tt>, we can use <tt>mvn</tt> to build the branding bundle:</p><pre>
+mvn install
+</pre><p>You just have to drop the file in the <tt>lib</tt> directory:</p><pre>
+cp branding.jar /opt/apache-karaf-3.0.0/lib/karaf-branding.jar
+</pre><p>You can now start Apache Karaf to see your branded console.</p><h2 id="WebConsole">WebConsole</h2><p>It's also possible to brand the Apache Karaf WebConsole.</p><p>You have to create a bundle, fragment of the Apache Karaf WebConsole.</p><p>This WebConsole branding bundle contains a <tt>META-INF/webconsole.properties</tt> containing branding properties:</p><pre>
+#
+# This file contains branding properties to overwrite the default
+# branding of the Apache Felix Web Console when deployed in an
+# Apache Karaf application.
+
+
+webconsole.brand.name = My Web Console
+
+webconsole.product.name = My Karaf
+webconsole.product.url = http://karaf.apache.org/
+webconsole.product.image = /res/karaf/imgs/logo.png
+
+webconsole.vendor.name = The Apache Software Foundation
+webconsole.vendor.url = http://www.apache.org
+webconsole.vendor.image = /res/karaf/imgs/logo.png
+
+webconsole.favicon = /res/karaf/imgs/favicon.ico
+webconsole.stylesheet = /res/karaf/ui/webconsole.css
+
+</pre><p>The bundle also provides the css stylesheet and images defined in this properties file.</p><p>As for console, you can use the following <tt>pom.xml</tt> to create the WebConsole branding bundle:</p><pre>
+<?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.group.id</groupId>
+ <artifactId>branding</artifactId>
+ <packaging>bundle</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.4.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-DocURL>http://felix.apache.org/site/apache-karaf.html</Bundle-DocURL>
+ <Fragment-Host>org.apache.karaf.webconsole.console;bundle-version="[3,4)"</Fragment-Host>
+ <Export-Package>!*</Export-Package>
+ <Import-Package>
+ javax.servlet;version=2.4,
+ javax.servlet.http;version=2.4,
+ !org.apache.felix.webconsole*,
+ org.apache.aries.blueprint,
+ org.osgi.service.blueprint.container,
+ org.osgi.service.blueprint.reflect,
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+</pre><p>With the <tt>webconsole</tt> feature installed, you can install this bundle (using <tt>bundle:install</tt> or by editing the<br/><tt>etc/startup.properties</tt>), you will see the WebConsole with your branding.</p>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="cell-2-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-3-0">
+
+ </td>
+ <td id="cell-3-1">
+
+ </td>
+ <td id="cell-3-2">
+ <div id="footer">
+ <div id="site-footer">
+ © 2008-2011 The Apache Software Foundation
+ <br/>
+ Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
+ </div>
+ </div>
+ </td>
+ <td id="cell-3-3">
+
+ </td>
+ <td id="cell-3-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-4-0" colspan="2">
+
+ </td>
+ <td id="cell-4-1">
+
+ </td>
+ <td id="cell-4-2" colspan="2">
+
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
\ No newline at end of file
Added: karaf/site/production/manual/latest-3.0.x/developers-guide/connect.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest-3.0.x/developers-guide/connect.html?rev=1688692&view=auto
==============================================================================
--- karaf/site/production/manual/latest-3.0.x/developers-guide/connect.html (added)
+++ karaf/site/production/manual/latest-3.0.x/developers-guide/connect.html Wed Jul 1 17:06:42 2015
@@ -0,0 +1,205 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="description" content="description goes here"/>
+ <meta name="keywords" content="keywords,goes,here"/>
+ <meta name="author" content="The Apache Karaf Team"/>
+ <link href="../css/style.css" rel="stylesheet" type="text/css"/>
+ <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
+ <title>
+ Apache Karaf 3.0.5-SNAPSHOT Guides
+ </title>
+ </head>
+ <body>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr width="100%">
+ <td id="cell-0-0" colspan="2">
+
+ </td>
+ <td id="cell-0-1">
+
+ </td>
+ <td id="cell-0-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-1-0">
+
+ </td>
+ <td id="cell-1-1">
+
+ </td>
+ <td id="cell-1-2">
+ <div style="padding: 5px;">
+ <div id="banner">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td align="left" class="topbardiv" nowrap="">
+<a href="http://karaf.apache.org/" title="A server side OSGi distribution">
+ <img border="0" src="../images/karaf-logo.png" width="400px"></img>
+</a>
+ </td>
+ <td align="right" nowrap="">
+<a href="http://www.apache.org/" title="The Apache Sofware Foundation">
+ <img border="0" src="../images/asf-logo.png">
+</a>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="top-menu">
+ <table border="0" cellpadding="1" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <div align="left"></div>
+ </td>
+ <td>
+ <div align="right">
+ <p>
+<a href="../index.html" title="Home">Home</a>
+|
+<a href="../users-guide/index.html" title="Users Guide">Users Guide</a>
+|
+<a href="index.html" title="Developers Guide">Developers Guide</a>
+</p>
+
+
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td id="cell-1-3">
+
+ </td>
+ <td id="cell-1-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-2-0" colspan="2">
+
+ </td>
+ <td id="cell-2-1">
+ <table>
+ <tr height="100%" valign="top">
+ <td height="100%">
+ <div id="wrapper-menu-page-right">
+ <div id="wrapper-menu-page-top">
+ <div id="wrapper-menu-page-bottom">
+ <div id="menu-page">
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="../users-guide/index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="../users-guide/installation.html">Installation</a></li><li><a href="../users-guide/directory-structure.html">Directory structure</a></li><li><a href="../users-guide/start-stop.html">Start, stop, restart, connect</a></li><li><a href="../users-guide/wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="../users-guide/console.html">Console</a></li><li><a href="../users-guide/remote.html">Remote</a></li><li><a href="../users-guide/log.html">Log</a></li><li><a href="../users-guide/configuration.html">Configuration</a></li><li><a href="../users-guide/urls.html">Artifacts repositories and URLs</a></li><li>
<a href="../users-guide/provisioning.html">Provisioning and features</a></li><li><a href="../users-guide/deployers.html">Deployers</a></li><li><a href="../users-guide/kar.html">KAR</a></li><li><a href="../users-guide/instances.html">Instances</a></li><li><a href="../users-guide/security.html">Security</a></li><li><a href="../users-guide/obr.html">OBR</a></li><li><a href="../users-guide/enterprise.html">Enterprise</a><ul><li><a href="../users-guide/webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="../users-guide/jndi.html">Naming (JNDI)</a></li><li><a href="../users-guide/jta.html">Transaction (JTA)</a></li><li><a href="../users-guide/jdbc.html">DataSource (JDBC)</a></li><li><a href="../users-guide/jms.html">MOM (JMS)</a></li><li><a href="../users-guide/jpa.html">Persistence (JPA)</a></li><li><a href="../users-guide/ejb.html">EJB</a></li><li><a href="../users-guide/cdi.html">CDI</a></li><li><a href="../users-guide/failover.html">HA/failover and cluster</a></li></ul><
/li><li><a href="../users-guide/monitoring.html">Monitoring and Management using JMX</a></li><li><a href="../users-guide/webconsole.html">WebConsole</a></li><li><a href="../users-guide/tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="developer-commands.html">Developer commands</a></li><li><a href="scripting.html">Scripting</a></li><li><a href="connect.html">Programmatically connect</a></li><li><a href="branding.html">Branding</a></li><li><a href="extending.html">Extending</a></li><li><a href="karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="custom-distribution.html">Custom distribution</a></li><li><a href="services.html">OSGi services</a></li><li><a href="creating-bundles.html">Create OSGi bundle</a></li><li><a href="blueprint.html">Blueprint</a></li><li><a href="cdi.html">CDI</a></li><li><a href="archetypes.html">Maven Archetypes</a></li><li><a href
="security-framework.html">Security Framework</a></li><li><a href="debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a href="writing-tests.html">Integration testing</a></li><li><a href="github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td height="100%" width="100%">
+ <div class="wiki-content">
+<h1 id="Programmaticallyconnect">Programmatically connect</h1><p>As described in the users guide, Apache Karaf supports remote access to both the console (by embedding a SSHd server) and<br/>the management layer.</p><h2 id="Totheconsole">To the console</h2><p>You can write a Apache Karaf remote console client in Java (or other language).</p><p>Accessing to a remote Apache Karaf console means writing a SSH client. This SSH client can be in pure Java or in<br/>another language.</p><p>For instance, the <tt>bin/client</tt> script starts a SSH client written in Java.</p><p>The following code is a simple code to create a SSH client:</p><pre>
+import org.apache.sshd.ClientChannel;
+import org.apache.sshd.ClientSession;
+import org.apache.sshd.SshClient;
+import org.apache.sshd.client.future.ConnectFuture;
+
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+ String host = "localhost";
+ int port = 8101;
+ String user = "karaf";
+ String password = "karaf";
+
+ SshClient client = null;
+ try {
+ client = SshClient.setUpDefaultClient();
+ client.start();
+ ConnectFuture future = client.connect(host, port);
+ future.await();
+ ClientSession session = future.getSession();
+ session.authPassword(user, password);
+ ClientChannel channel = session.createChannel("shell");
+ channel.setIn(System.in);
+ channel.setOut(System.out);
+ channel.setErr(System.err);
+ channel.open();
+ channel.waitFor(ClientChannel.CLOSED, 0);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ System.exit(1);
+ } finally {
+ try {
+ client.stop();
+ } catch (Throwable t) { }
+ }
+ System.exit(0);
+ }
+
+}
+</pre><h2 id="Tothemanagementlayer">To the management layer</h2><p>The Apache Karaf management layer uses JMX. Apache Karaf embeds a JMX MBeanServer that you can use remotely.</p><p>In order to use the MBeanServer remotely, you have to write a JMX client.</p><p>The following example shows a simple JMX client stopping Apache Karaf remotely via the JMX layer:</p><pre>
+javax.management.*;
+
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+ JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root");
+ JMXConnector connector = JMXConnectorFactory.connect(url, null);
+ MBeanServerConnection mbeanServer = connector.getMBeanServerConnection();
+ ObjectName systemMBean = new ObjectName("org.apache.karaf:type=system,name=karaf-root");
+ mbeanServer.invoke(systemMBean, "halt", null, null);
+ connector.close();
+ }
+
+}
+</pre>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="cell-2-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-3-0">
+
+ </td>
+ <td id="cell-3-1">
+
+ </td>
+ <td id="cell-3-2">
+ <div id="footer">
+ <div id="site-footer">
+ © 2008-2011 The Apache Software Foundation
+ <br/>
+ Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
+ </div>
+ </div>
+ </td>
+ <td id="cell-3-3">
+
+ </td>
+ <td id="cell-3-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-4-0" colspan="2">
+
+ </td>
+ <td id="cell-4-1">
+
+ </td>
+ <td id="cell-4-2" colspan="2">
+
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
\ No newline at end of file
Added: karaf/site/production/manual/latest-3.0.x/developers-guide/creating-bundles.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest-3.0.x/developers-guide/creating-bundles.html?rev=1688692&view=auto
==============================================================================
--- karaf/site/production/manual/latest-3.0.x/developers-guide/creating-bundles.html (added)
+++ karaf/site/production/manual/latest-3.0.x/developers-guide/creating-bundles.html Wed Jul 1 17:06:42 2015
@@ -0,0 +1,295 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="description" content="description goes here"/>
+ <meta name="keywords" content="keywords,goes,here"/>
+ <meta name="author" content="The Apache Karaf Team"/>
+ <link href="../css/style.css" rel="stylesheet" type="text/css"/>
+ <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
+ <title>
+ Apache Karaf 3.0.5-SNAPSHOT Guides
+ </title>
+ </head>
+ <body>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr width="100%">
+ <td id="cell-0-0" colspan="2">
+
+ </td>
+ <td id="cell-0-1">
+
+ </td>
+ <td id="cell-0-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-1-0">
+
+ </td>
+ <td id="cell-1-1">
+
+ </td>
+ <td id="cell-1-2">
+ <div style="padding: 5px;">
+ <div id="banner">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td align="left" class="topbardiv" nowrap="">
+<a href="http://karaf.apache.org/" title="A server side OSGi distribution">
+ <img border="0" src="../images/karaf-logo.png" width="400px"></img>
+</a>
+ </td>
+ <td align="right" nowrap="">
+<a href="http://www.apache.org/" title="The Apache Sofware Foundation">
+ <img border="0" src="../images/asf-logo.png">
+</a>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="top-menu">
+ <table border="0" cellpadding="1" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <div align="left"></div>
+ </td>
+ <td>
+ <div align="right">
+ <p>
+<a href="../index.html" title="Home">Home</a>
+|
+<a href="../users-guide/index.html" title="Users Guide">Users Guide</a>
+|
+<a href="index.html" title="Developers Guide">Developers Guide</a>
+</p>
+
+
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td id="cell-1-3">
+
+ </td>
+ <td id="cell-1-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-2-0" colspan="2">
+
+ </td>
+ <td id="cell-2-1">
+ <table>
+ <tr height="100%" valign="top">
+ <td height="100%">
+ <div id="wrapper-menu-page-right">
+ <div id="wrapper-menu-page-top">
+ <div id="wrapper-menu-page-bottom">
+ <div id="menu-page">
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="../users-guide/index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="../users-guide/installation.html">Installation</a></li><li><a href="../users-guide/directory-structure.html">Directory structure</a></li><li><a href="../users-guide/start-stop.html">Start, stop, restart, connect</a></li><li><a href="../users-guide/wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="../users-guide/console.html">Console</a></li><li><a href="../users-guide/remote.html">Remote</a></li><li><a href="../users-guide/log.html">Log</a></li><li><a href="../users-guide/configuration.html">Configuration</a></li><li><a href="../users-guide/urls.html">Artifacts repositories and URLs</a></li><li>
<a href="../users-guide/provisioning.html">Provisioning and features</a></li><li><a href="../users-guide/deployers.html">Deployers</a></li><li><a href="../users-guide/kar.html">KAR</a></li><li><a href="../users-guide/instances.html">Instances</a></li><li><a href="../users-guide/security.html">Security</a></li><li><a href="../users-guide/obr.html">OBR</a></li><li><a href="../users-guide/enterprise.html">Enterprise</a><ul><li><a href="../users-guide/webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="../users-guide/jndi.html">Naming (JNDI)</a></li><li><a href="../users-guide/jta.html">Transaction (JTA)</a></li><li><a href="../users-guide/jdbc.html">DataSource (JDBC)</a></li><li><a href="../users-guide/jms.html">MOM (JMS)</a></li><li><a href="../users-guide/jpa.html">Persistence (JPA)</a></li><li><a href="../users-guide/ejb.html">EJB</a></li><li><a href="../users-guide/cdi.html">CDI</a></li><li><a href="../users-guide/failover.html">HA/failover and cluster</a></li></ul><
/li><li><a href="../users-guide/monitoring.html">Monitoring and Management using JMX</a></li><li><a href="../users-guide/webconsole.html">WebConsole</a></li><li><a href="../users-guide/tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="developer-commands.html">Developer commands</a></li><li><a href="scripting.html">Scripting</a></li><li><a href="connect.html">Programmatically connect</a></li><li><a href="branding.html">Branding</a></li><li><a href="extending.html">Extending</a></li><li><a href="karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="custom-distribution.html">Custom distribution</a></li><li><a href="services.html">OSGi services</a></li><li><a href="creating-bundles.html">Create OSGi bundle</a></li><li><a href="blueprint.html">Blueprint</a></li><li><a href="cdi.html">CDI</a></li><li><a href="archetypes.html">Maven Archetypes</a></li><li><a href
="security-framework.html">Security Framework</a></li><li><a href="debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a href="writing-tests.html">Integration testing</a></li><li><a href="github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td height="100%" width="100%">
+ <div class="wiki-content">
+<h1 id="BasicbundlecreationusingtheFelixmavenbundleplugin">Basic bundle creation using the Felix maven-bundle-plugin</h1><p>Create a bundle instead of a normal jar by using a pom file like this:</p><pre>
+<?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>/home/jbonofre/Workspace/karaf/manual/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>manual</Bundle-SymbolicName>
+ ...
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+</pre><h2 id="Addextendedinformationtobundles">Add extended information to bundles</h2><p>Karaf supports a OSGI-INF/bundle.info file in a bundle. This file is extended description of the bundle. It supports ASCII character declarations (for adding color, formatting, etc) and some simple Wiki syntax.</p><p>Simply add a src/main/resources/OSGI-INF/bundle.info file containing, for instance:</p><pre>
+h1. SYNOPSIS
+ The Apache Software Foundation provides support for the Apache community of open-source software projects.
+ The Apache projects are characterized by a collaborative, consensus based development process, an open and
+ pragmatic software license, and a desire to create high quality software that leads the way in its field.
+ We consider ourselves not simply a group of projects sharing a server, but rather a community of developers
+ and users.
+
+h1. DESCRIPTION
+ Long description of your bundle, including usage, etc.
+
+h1.SEE ALSO
+ [http://yourside\]
+ [http://yourside/docs\]
+</pre><p>You can display this extended information using:</p><pre>
+root@karaf> bundles:info
+</pre><h2 id="WikiSyntax">Wiki Syntax</h2><p>Karaf supports some simple wiki syntax in bunde info files:</p><pre>
+h1., h2., ... : Headings
+* : Enumerations
+[http://....] : links
+</pre><h1 id="CreatingbundlesfornonOSGithirdpartydependencies">Creating bundles for non OSGi third party dependencies</h1><h2 id="Dynamicallywrappingjars">Dynamically wrapping jars</h2><p>Karaf supports the wrap: protocol execution.</p><p>It allows for directly deploying third party dependencies, like Apache Commons Lang:</p><pre>
+root@karaf> bundles:install wrap:mvn:commons-lang/commons-lang/2.4
+</pre><p>The wrap protocol creates a bundle dynamically using the bnd. Confiugurations can be added in the wrap URL:</p><p>from the shell</p><pre>
+root@karaf> bundles:install 'wrap:mvn:commons-lang/commons-lang/2.4$Bundle-SymbolicName=commons-lang&Bundle-Version=2.4'
+</pre><p>from features.xml</p><pre>
+<bundle>wrap:mvn:commons-lang/commons-lang/2.4$Bundle-SymbolicName=commons-lang&undle-Version=2.4</bundle>
+</pre><h2 id="Staticallybundlingjars">Statically bundling jars</h2><p>You can also create a wrap bundle for a third party dependency.<br/>This bundle is simply a Maven POM that shades an existing jar and package into a jar bundle.</p><p>For instance, to create an OSGi bundle that wraps Apache Commons Lang, simply define the following Maven POM:</p><pre>
+<?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>osgi.commons-lang</groupId>
+ <artifactId>osgi.commons-lang</artifactId>
+ <version>2.4</version>
+ <packaging>bundle</packaging>
+ <name>commons-lang OSGi Bundle</name>
+ <description>This OSGi bundle simply wraps commons-lang-2.4.jar artifact.</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>commons-lang:commons-lang</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>commons-lang:commons-lang</artifact>
+ <excludes>
+ <exclude>**</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+ <createDependencyReducedPom>true</createDependencyReducedPom>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>manual</Bundle-SymbolicName>
+ <Export-Package></Export-Package>
+ <Import-Package></Import-Package>
+ <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+ <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Embed-Dependency</_removeheaders>
+ </instructions>
+ <unpackBundle>true</unpackBundle>
+ </configuration>
+ </plugin>
+ </build>
+
+</project>
+</pre><p>The resulting OSGi bundle can now be deployed directly:</p><pre>
+root@karaf> bundles:install -s mvn:osgi.commons-lang/osgi.commons-lang/2.4
+</pre><p>Some more information is available at <a href="http://gnodet.blogspot.com/2008/09/id-like-to-talk-bit-about-third-party.html">http://gnodet.blogspot.com/2008/09/id-like-to-talk-bit-about-third-party.html</a>, <a href="http://blog.springsource.com/2008/02/18/creating-osgi-bundles/">http://blog.springsource.com/2008/02/18/creating-osgi-bundles/</a> and <a href="http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html">http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html</a>.</p>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="cell-2-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-3-0">
+
+ </td>
+ <td id="cell-3-1">
+
+ </td>
+ <td id="cell-3-2">
+ <div id="footer">
+ <div id="site-footer">
+ © 2008-2011 The Apache Software Foundation
+ <br/>
+ Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
+ </div>
+ </div>
+ </td>
+ <td id="cell-3-3">
+
+ </td>
+ <td id="cell-3-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-4-0" colspan="2">
+
+ </td>
+ <td id="cell-4-1">
+
+ </td>
+ <td id="cell-4-2" colspan="2">
+
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
\ No newline at end of file
Added: karaf/site/production/manual/latest-3.0.x/developers-guide/custom-distribution.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest-3.0.x/developers-guide/custom-distribution.html?rev=1688692&view=auto
==============================================================================
--- karaf/site/production/manual/latest-3.0.x/developers-guide/custom-distribution.html (added)
+++ karaf/site/production/manual/latest-3.0.x/developers-guide/custom-distribution.html Wed Jul 1 17:06:42 2015
@@ -0,0 +1,676 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="description" content="description goes here"/>
+ <meta name="keywords" content="keywords,goes,here"/>
+ <meta name="author" content="The Apache Karaf Team"/>
+ <link href="../css/style.css" rel="stylesheet" type="text/css"/>
+ <link href="../css/pygmentize.css" rel="stylesheet" type="text/css"/>
+ <title>
+ Apache Karaf 3.0.5-SNAPSHOT Guides
+ </title>
+ </head>
+ <body>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr width="100%">
+ <td id="cell-0-0" colspan="2">
+
+ </td>
+ <td id="cell-0-1">
+
+ </td>
+ <td id="cell-0-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-1-0">
+
+ </td>
+ <td id="cell-1-1">
+
+ </td>
+ <td id="cell-1-2">
+ <div style="padding: 5px;">
+ <div id="banner">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td align="left" class="topbardiv" nowrap="">
+<a href="http://karaf.apache.org/" title="A server side OSGi distribution">
+ <img border="0" src="../images/karaf-logo.png" width="400px"></img>
+</a>
+ </td>
+ <td align="right" nowrap="">
+<a href="http://www.apache.org/" title="The Apache Sofware Foundation">
+ <img border="0" src="../images/asf-logo.png">
+</a>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <div id="top-menu">
+ <table border="0" cellpadding="1" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <div align="left"></div>
+ </td>
+ <td>
+ <div align="right">
+ <p>
+<a href="../index.html" title="Home">Home</a>
+|
+<a href="../users-guide/index.html" title="Users Guide">Users Guide</a>
+|
+<a href="index.html" title="Developers Guide">Developers Guide</a>
+</p>
+
+
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td id="cell-1-3">
+
+ </td>
+ <td id="cell-1-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-2-0" colspan="2">
+
+ </td>
+ <td id="cell-2-1">
+ <table>
+ <tr height="100%" valign="top">
+ <td height="100%">
+ <div id="wrapper-menu-page-right">
+ <div id="wrapper-menu-page-top">
+ <div id="wrapper-menu-page-bottom">
+ <div id="menu-page">
+ <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="../users-guide/index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="../users-guide/installation.html">Installation</a></li><li><a href="../users-guide/directory-structure.html">Directory structure</a></li><li><a href="../users-guide/start-stop.html">Start, stop, restart, connect</a></li><li><a href="../users-guide/wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="../users-guide/console.html">Console</a></li><li><a href="../users-guide/remote.html">Remote</a></li><li><a href="../users-guide/log.html">Log</a></li><li><a href="../users-guide/configuration.html">Configuration</a></li><li><a href="../users-guide/urls.html">Artifacts repositories and URLs</a></li><li>
<a href="../users-guide/provisioning.html">Provisioning and features</a></li><li><a href="../users-guide/deployers.html">Deployers</a></li><li><a href="../users-guide/kar.html">KAR</a></li><li><a href="../users-guide/instances.html">Instances</a></li><li><a href="../users-guide/security.html">Security</a></li><li><a href="../users-guide/obr.html">OBR</a></li><li><a href="../users-guide/enterprise.html">Enterprise</a><ul><li><a href="../users-guide/webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="../users-guide/jndi.html">Naming (JNDI)</a></li><li><a href="../users-guide/jta.html">Transaction (JTA)</a></li><li><a href="../users-guide/jdbc.html">DataSource (JDBC)</a></li><li><a href="../users-guide/jms.html">MOM (JMS)</a></li><li><a href="../users-guide/jpa.html">Persistence (JPA)</a></li><li><a href="../users-guide/ejb.html">EJB</a></li><li><a href="../users-guide/cdi.html">CDI</a></li><li><a href="../users-guide/failover.html">HA/failover and cluster</a></li></ul><
/li><li><a href="../users-guide/monitoring.html">Monitoring and Management using JMX</a></li><li><a href="../users-guide/webconsole.html">WebConsole</a></li><li><a href="../users-guide/tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="developer-commands.html">Developer commands</a></li><li><a href="scripting.html">Scripting</a></li><li><a href="connect.html">Programmatically connect</a></li><li><a href="branding.html">Branding</a></li><li><a href="extending.html">Extending</a></li><li><a href="karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="custom-distribution.html">Custom distribution</a></li><li><a href="services.html">OSGi services</a></li><li><a href="creating-bundles.html">Create OSGi bundle</a></li><li><a href="blueprint.html">Blueprint</a></li><li><a href="cdi.html">CDI</a></li><li><a href="archetypes.html">Maven Archetypes</a></li><li><a href
="security-framework.html">Security Framework</a></li><li><a href="debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a href="writing-tests.html">Integration testing</a></li><li><a href="github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td height="100%" width="100%">
+ <div class="wiki-content">
+<h1 id="Customdistributions">Custom distributions</h1><p>As Karaf is an OSGi container, it's heavily used as as application and middleware kernel.</p><p>You may wish to construct your own Karaf distribution preconfigured to your requirements.<br/>This custom distribution could contain:</p><ul style="list-style: square"><li>branding to change the Karaf console look-and-feel</li><li>configuration files (in the etc folder) altered to your requirements</li><li>pre-packaged artifacts in the deploy folder</li><li>a pre-populated system repository (containing your own bundle and features descriptor)</li><li>renamed or specific scripts in the bin folder</li><li>system documentation files</li></ul><h2 id="Mavenassembly">Maven assembly</h2><p>The recommended way to create a Karaf server assembly is to use the karaf-assembly packaging with the karaf-maven-plugin.<br/>It assembles a server from the maven dependencies in the project pom.<br/>After explanation of the configuration options we pres
ent an example.</p><p>The Karaf project effectively uses this packaging to assemble the official Karaf distributions, but due to maven<br/>limitations we have to simulate rather than use the karaf-assembly packaging.</p><p>This packaging creates tar.gz and zip archives containing the assembled server.<br/>They are identical except that zip archives don't unpack with appropriate unix file permissions for the scripts.</p><h3 id="Mavendependencies">Maven dependencies</h3><p>Maven dependencies in a karaf-assembly project can be feature repositories (classifier "features") or kar archives.</p><p>Feature repositories are installed in the internal "system" Maven structured repository.</p><p>Kar archives have their content unpacked on top of the server as well as contained feature repositories installed.</p><p>The Maven scope of a dependency determines whether its feature repository is listed in the features service configuration<br/>file etc/org.apache.karaf.features.cfg featuresRepositori
es property:</p><p>compile (default): All the features in the repository (or for a kar repositories) will be installed into the startup.properties.</p><p>runtime: feature installation is controlled by <startupFeature>, <bootFeature>, and <installedFeature> elements in the karaf-maven-plugin configuration.<br/>The feature repo uri is listed in the features service configuration file.</p><h3 id="Pluginconfiguration">Plugin configuration</h3><p>Control how features are installed using these elements referring to features from installed feature repositories:</p><ul><li><startupFeature>foo</startupFeature> This will result in the feature bundles being listed in startup.properties at the appropriate start level and the bundles being copied into the "system" internal repository. You can use feature_name or feature_name/feature_version formats.</li></ul><ul><li><bootFeature>bar</bootFeature> This will result in the feature name added to boot-features in the features se
rvice configuration file and all the bundles in the feature copied into the "system" internal repository. You can use feature_name or feature_name/feature_version formats.</li></ul><ul><li><installedFeature>baz</installedFeature> This will result in all the bundles in the feature being installed in the "system" internal repository. Therefore at runtime the feature may be installed without access to external repositories. You can use feature_name or feature_name/feature_version formats.</li></ul><h3 id="MinimalDistributionExample">Minimal Distribution Example</h3><p>This is the minimal assembly pom changed to use the packaging and annotated</p><pre>
+<?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>
+
+ <parent>
+...
+ </parent>
+
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf-minimal</artifactId>
+ <version>3.0.5-SNAPSHOT</version>
+ <packaging>karaf-assembly</packaging>
+ <name>Apache Karaf :: Assemblies :: Minimal Distribution</name>
+
+ <dependencies>
+ <dependency>
+ <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>3.0.5-SNAPSHOT</version>
+ <type>kar</type>
+ </dependency>
+ <dependency>
+ <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>standard</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <!-- if you want to include resources in the distribution -->
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <!-- if you want to include resources in the distribution -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>process-resources</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- karaf-maven-plugin will call both install-kar and instance-create-archive goals -->
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- no startupFeatures -->
+ <bootFeatures>
+ <feature>standard</feature>
+ <feature>management</feature>
+ </bootFeatures>
+ <!-- no installedFeatures -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+</pre><h3 id="CustomDistributionExample">Custom Distribution Example</h3><p>It's possible to specify feature versions using the name/version format.</p><p>For instance, to pre-install Spring 4.0.7.RELEASE_1 feature in your custom distribution, you can use the following pom.xml:</p><pre>
+<?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.custom</groupId>
+ <artifactId>my.distribution</artifactId>
+ <version>1.0</version>
+ <packaging>karaf-assembly</packaging>
+
+ <dependencies>
+ <dependency>
+ <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>4.0.0</version>
+ <type>kar</type>
+ </dependency>
+ <dependency>
+ <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>standard</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>spring</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <!-- if you want to include resources in the distribution -->
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <!-- if you want to include resources in the distribution -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>process-resources</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>4.0.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- no startupFeatures -->
+ <bootFeatures>
+ <feature>jaas</feature>
+ <feature>shell</feature>
+ <feature>ssh</feature>
+ <feature>management</feature>
+ <feature>bundle</feature>
+ <feature>config</feature>
+ <feature>deployer</feature>
+ <feature>diagnostic</feature>
+ <feature>instance</feature>
+ <feature>kar</feature>
+ <feature>log</feature>
+ <feature>package</feature>
+ <feature>service</feature>
+ <feature>system</feature>
+ </bootFeatures>
+ <installedFeatures>
+ <feature>wrapper</feature>
+ <feature>spring/4.0.7.RELEASE_1</feature>
+ </installedFeatures>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+</pre><h2 id="deprecatedoldstyleMavenassembly">(deprecated old style) Maven assembly</h2><p>Basically a Karaf custom distribution involves:<br/>1. Uncompressing a standard Karaf distribution in a given directory.<br/>2. Populating the system repo with your features.<br/>3. Populating the lib directory with your branding or other system bundle jar files.<br/>4. Overriding the configuration files in the etc folder.</p><p>These tasks could be performed using scripting, or more easily and portable, using Apache Maven and a set of Maven plugins.</p><p>For instance, the Maven POM could look like:</p><pre>
+<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <groupId>my.company</groupId>
+ <artifactId>mycustom-karaf</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+ <name>My Unix Custom Karaf Distribution</name>
+
+ <properties>
+ <karaf.version>3.0.5-SNAPSHOT</karaf.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>3.0.5-SNAPSHOT</version>
+ <type>tar.gz</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>3.0.5-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>/home/jbonofre/Workspace/karaf/manual/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>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>features-maven-plugin</artifactId>
+ <version>3.0.5-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>add-features-to-repo</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-features-to-repo</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>mvn:org.apache.karaf/apache-karaf/3.0.5-SNAPSHOT/xml/features</descriptor>
+ <descriptor>file:/home/jbonofre/Workspace/karaf/manual/target/classes/my-features.xml</descriptor>
+ </descriptors>
+ <features>
+ <feature>my-feature</feature>
+ </features>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <!-- Define here the artifacts which should be considered in the assembly -->
+ <!-- For instance, the branding jar -->
+ <artifactItems>
+ <artifactItem>
+ <groupId>my.groupId</groupId>
+ <artifactId>my.branding.id</artifactId>
+ <version>1.0</version>
+ <outputDirectory>target/dependencies</outputDirectory>
+ <destFileName>mybranding.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <!-- Uncompress the standard Karaf distribution -->
+ <id>unpack</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <type>tar.gz</type>
+ <outputDirectory>target/dependencies</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>bin</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/descriptors/bin.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+</pre><p>The Maven POM will download the Karaf standard distribution and prepare resources to be processed by the Maven assembly plugin.</p><p>Your Maven project structure should look like:</p><ul><li>pom.xml: the previous POM file</li><li>src/main/descriptors/bin.xml: the assembly Maven plugin descriptor (see below)</li><li>src/main/filtered-resources: contains all resource files that have Maven property values to be filtered/replaced. Typically, this will include features descriptor and configuration files.</li><li>src/main/distribution: contains all raw files which will be copied as-is into your custom distribution.</li></ul><p>For instance, <tt>src/main/filtered-resources</tt> could contain:</p><ul><li><tt>my-features.xml</tt> where Maven properties will be replaced</li><li><tt>etc/org.apache.karaf.features.cfg</tt> file containing your my-features descriptor:<pre>
+#
+# Comma separated list of features repositories to register by default
+#
+featuresRepositories=mvn:org.apache.karaf/apache-karaf/3.0.5-SNAPSHOT/xml/features,mvn:my.groupId/my-features/3.0.5-SNAPSHOT/xml/features
+
+#
+# Comma separated list of features to install at startup
+#
+featuresBoot=config,ssh,management,my-feature
+</pre></li></ul><p>The <tt>src/main/distribution</tt> contains all your custom Karaf configuration files and script, as, for examples:</p><ul><li>etc/org.ops4j.pax.logging.cfg<pre>
+# Root logger
+log4j.rootLogger=INFO, out, osgi:VmLogAppender
+log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.RollingFileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+log4j.appender.out.file=${karaf.home}/log/my-customer-distribution.log
+log4j.appender.out.append=true
+log4j.appender.out.maxFileSize=1MB
+log4j.appender.out.maxBackupIndex=10
+
+# Sift appender
+log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+log4j.appender.sift.key=bundle.name
+log4j.appender.sift.default=my-custom
+log4j.appender.sift.appender=org.apache.log4j.FileAppender
+log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
+log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
+log4j.appender.sift.appender.append=true
+</pre></li><li>etc/system.properties<pre>
+#
+# The properties defined in this file will be made available through system
+# properties at the very beginning of the FAS boot process.
+#
+
+# Log level when the pax-logging service is not available
+# This level will only be used while the pax-logging service bundle
+# is not fully available.
+# To change log levels, please refer to the org.ops4j.pax.logging.cfg file
+# instead.
+org.ops4j.pax.logging.DefaultServiceLog.level=ERROR
+
+#
+# Name of this custom instance.
+#
+karaf.name=my-custom
+
+#
+# Default repository where bundles will be loaded from before using
+# other Maven repositories. For the full Maven configuration, see the
+# org.ops4j.pax.url.mvn.cfg file.
+#
+karaf.default.repository=system
+
+#
+# Location of a shell script that will be run when starting a shell
+# session. This script can be used to create aliases and define
+# additional commands.
+#
+karaf.shell.init.script=${karaf.home}/etc/shell.init.script
+
+#
+# Set this empty property to avoid errors when validating xml documents.
+#
+xml.catalog.files=
+
+#
+# Suppress the bell in the console when hitting backspace to many times
+# for example
+#
+jline.nobell=true
+
+#
+# Default port for the OSGi HTTP Service
+#
+org.osgi.service.http.port=8181
+
+#
+# Allow usage of ${custom.home} as an alias for ${karaf.home}
+#
+custom.home=${karaf.home}
+</pre></li><li>etc/users.properties<pre>
+admin=admin,admin
+</pre></li><li>You can add a <tt>etc/custom.properties</tt>, it's a placeholder for any override you may need. For instance:<pre>
+karaf.systemBundlesStartLevel=50
+obr.repository.url=http://svn.apache.org/repos/asf/servicemix/smx4/obr-repo/repository.xml
+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; \
+ com.sun.jndi.ldap
+</pre></li></ul><p>Now, we can "assemble" our custom distribution using the Maven assembly plugin. The Maven assembly plugin uses an<br/>assembly descriptor, configured in POM above to be <tt>src/main/descriptors/bin.xml</tt>:</p><pre>
+<assembly>
+
+ <id>bin</id>
+
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+
+ <fileSets>
+
+ <!-- Expanded Karaf Standard Distribution -->
+ <fileSet>
+ <directory>target/dependencies/apache-karaf-3.0.5-SNAPSHOT</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>**/demos/**</exclude>
+ <exclude>bin/**</exclude>
+ <exclude>etc/system.properties</exclude>
+ <exclude>etc/users.properties</exclude>
+ <exclude>etc/org.apache.karaf.features.cfg</exclude>
+ <exclude>etc/org.ops4j.pax.logging.cfg</exclude>
+ <exclude>LICENSE</exclude>
+ <exclude>NOTICE</exclude>
+ <exclude>README</exclude>
+ <exclude>RELEASE-NOTES</exclude>
+ <exclude>karaf-manual*.html</exclude>
+ <exclude>karaf-manual*.pdf</exclude>
+ </excludes>
+ </fileSet>
+
+ <!-- Copy over bin/* separately to get the correct file mode -->
+ <fileSet>
+ <directory>target/dependencies/apache-karaf-3.0.5-SNAPSHOT</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>bin/admin</include>
+ <include>bin/karaf</include>
+ <include>bin/start</include>
+ <include>bin/stop</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+
+ <!-- Copy over jar files -->
+ <fileSet>
+ <directory>target/dependencies</directory>
+ <includes>
+ <include>my-custom.jar</include>
+ </includes>
+ <outputDirectory>/lib/</outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>src/main/distribution</directory>
+ <outputDirectory>/</outputDirectory>
+ <fileMode>0644</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>target/classes/etc</directory>
+ <outputDirectory>/etc/</outputDirectory>
+ <lineEnding>unix</lineEnding>
+ <fileMode>0644</fileMode>
+ </fileSet>
+
+ <fileSet>
+ <directory>target/features-repo</directory>
+ <outputDirectory>/system</outputDirectory>
+ </fileSet>
+
+ </fileSets>
+
+ <files>
+ <file>
+ <source>/home/jbonofre/Workspace/karaf/manual/target/dependencies/apache-karaf-3.0.5-SNAPSHOT/bin/karaf</source>
+ <outputDirectory>/bin/</outputDirectory>
+ <destName>my-custom</destName>
+ <fileMode>0755</fileMode>
+ <lineEnding>unix</lineEnding>
+ </file>
+ <file>
+ <source>/home/jbonofre/Workspace/karaf/manual/target/classes/features.xml</source>
+ <outputDirectory>/system/my.groupid/my-features/3.0.5-SNAPSHOT</outputDirectory>
+ <destName>my-features-3.0.5-SNAPSHOT-features.xml</destName>
+ <fileMode>0644</fileMode>
+ <lineEnding>unix</lineEnding>
+ </file>
+ </files>
+
+</assembly>
+</pre><p>To build your custom Karaf distribution, just run:</p><pre>
+mvn install
+</pre><p>You will find your Karaf custom distribution tar.gz in the target directory.</p><h2 id="Roadmap">Roadmap</h2><p>A distribution goal is in preparation in the next Karaf</p><h2 id="Customdistributionexamples">Custom distribution examples</h2><ul><li><a href="http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/assemblies/">Apache ServiceMix 4</a></li><li><a href="http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/bundle/">Apache ServiceMix NMR</a></li><li><a href="http://buildprocess.svn.sourceforge.net/viewvc/buildprocess/builderaser/trunk/assembly/">BuildProcess BuildEraser</a></li></ul>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="cell-2-2" colspan="2">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-3-0">
+
+ </td>
+ <td id="cell-3-1">
+
+ </td>
+ <td id="cell-3-2">
+ <div id="footer">
+ <div id="site-footer">
+ © 2008-2011 The Apache Software Foundation
+ <br/>
+ Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
+ </div>
+ </div>
+ </td>
+ <td id="cell-3-3">
+
+ </td>
+ <td id="cell-3-4">
+
+ </td>
+ </tr>
+ <tr width="100%">
+ <td id="cell-4-0" colspan="2">
+
+ </td>
+ <td id="cell-4-1">
+
+ </td>
+ <td id="cell-4-2" colspan="2">
+
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
\ No newline at end of file