Added: karaf/site/production/manual/latest/users-guide/obr.html URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/obr.html?rev=1553356&view=auto ============================================================================== --- karaf/site/production/manual/latest/users-guide/obr.html (added) +++ karaf/site/production/manual/latest/users-guide/obr.html Wed Dec 25 06:31:51 2013 @@ -0,0 +1,258 @@ +<!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.1-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="index.html" title="Users Guide">Users Guide</a> +| +<a href="../developers-guide/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="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installation</a></li><li><a href="directory-structure.html">Directory structure</a></li><li><a href="start-stop.html">Start, stop, restart, connect</a></li><li><a href="wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="console.html">Console</a></li><li><a href="remote.html">Remote</a></li><li><a href="log.html">Log</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="urls.html">Artifacts repositories and URLs</a></li><li><a href="provisioning.html">Provisioning and features</a></li><li><a href="deployers.html">Deployers</a></li><li><a href="kar.html">KAR</a></li><li><a href="instances.html">Instances</a></li><li><a href="security.html">Security</a></li><li><a href="obr.html">OBR</a></li><li><a href="enterprise.html">Enterprise</a><ul><li><a href="webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="jndi.html">Naming (JNDI)</a></li><li><a href="jta.html">Transaction (JTA)</a></li><li><a href="jdbc.html">DataSource (JDBC)</a></li><li><a href="jms.html">MOM (JMS)</a></li><li><a href="jpa.html">Persistence (JPA)</a></li><li><a href="ejb.html">EJB</a></li><li><a href="cdi.html">CDI</a></li><li><a href="failover.html">HA/failover and cluster</a></li></ul></li><li><a href="monitoring.html">Monitoring and Management using JMX</a></li><li><a href="webconsole.html">WebConsole</a></li><li><a href="tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/developer-commands.html">Developer command s</a></li><li><a href="../developers-guide/scripting.html">Scripting</a></li><li><a href="../developers-guide/connect.html">Programmatically connect</a></li><li><a href="../developers-guide/branding.html">Branding</a></li><li><a href="../developers-guide/extending.html">Extending</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="../developers-guide/custom-distribution.html">Custom distribution</a></li><li><a href="../developers-guide/services.html">OSGi services</a></li><li><a href="../developers-guide/creating-bundles.html">Create OSGi bundle</a></li><li><a href="../developers-guide/blueprint.html">Blueprint</a></li><li><a href="../developers-guide/cdi.html">CDI</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a href="../developers-guide/writing-tests.html">Integration testing</a></li><li><a href="../developers-guide/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="OBR">OBR</h1><p>The goal of OBR (OSGi Bundle Repository) is:</p><p>1. to simplify deploying and using bundles<br/>2. to encourage independent bundle development.</p><p>OBR achieves the first goal by providing a service that can automatically install a bundle, with its deployment dependencies,<br/>from a bundle repository. This makes it easier for people to experiment with existing bundles.</p><p>The second goal is achieved by raising the visibility of the available bundles in a repository.</p><p>OBR is an optional Apache Karaf feature. You have to install the <tt>obr</tt> feature to use OBR service:</p><pre> +karaf@root()> feature:install obr +</pre><p>The OBR feature turns Apache Karaf as an OBR client. It means that Apache Karaf can use a OBR repository to the installation<br/>of the bundles, and during the installation of the features.</p><p>The installation of the <tt>obr</tt> feature adds in Apache Karaf:</p><ul><li>the OBR service</li><li>the features OBR resolver</li><li>the <tt>obr:*</tt> commands</li><li>the JMX ObrMBean</li></ul><p>The OBR repository contains all bundles. The OBR service knows all requirements and capabilities of each bundle on an<br/>OBR repository (it's the OBR metadata).</p><p>Thanks to that, when you install ("deploy" in OBR wording) a bundle using the OBR service, it looks for all bundles<br/>providing the capabilities matching the bundle requirements.<br/>It will automatically install the bundles needed for the bundle.</p><h2 id="FeaturesOBRresolver">Features OBR resolver</h2><p>If the feature specifies <tt>obr</tt> in the <tt>resolver</tt> attribute, Apache Karaf can use the OBR service t o construct the list<br/>of bundles to install with the features.</p><p>The feature default resolver just consider the bundles described in the feature itself.</p><p>Using the OBR resolver, Apache Karaf can extend the bundle list at the feature installation time using the OBR service.</p><h2 id="Commands">Commands</h2><h3 id="obrurladd"><tt>obr:url-add</tt></h3><p>The <tt>obr:url-add</tt> command registers the OBR repository at a given URL in the OBR service.</p><p>Basically, an OBR repository is described by a <tt>repository.xml</tt> file.</p><p>The <tt>obr:url-add</tt> command expects an <tt>url</tt> argument. The <tt>url</tt> argument is the URL to the OBR repository <tt>repository.xml</tt> file.<br/>Any URL described in the <a href="urls.html">Artifacts repositories and URLs section</a> is supported.</p><p>For instance:</p><pre> +karaf@root()> obr:url-add file:///user/.m2/repository/repository.xml +</pre><h3 id="obrurllist"><tt>obr:url-list</tt></h3><p>The <tt>obr:url-list</tt> command lists the OBR repository (with URL) registered in the OBR service:</p><pre> +karaf@root()> obr:url-list +Index | OBR URL +--------------------------------------------------------- +0 | file:/user/.m2/repository/repository.xml +</pre><h3 id="obrurlrefresh"><tt>obr:url-refresh</tt></h3><p>The <tt>obr:url-refresh</tt> command refresh an OBR repository (reloading the URL).</p><p>The OBR service doesn't take "on the fly" the changes performed on an OBR repository <tt>repository.xml</tt>. You have to<br/>reload the <tt>repository.xml</tt> URL to take the changes. It's the purpose of the <tt>obr:url-refresh</tt> command.</p><p>Without argument, the <tt>obr:url-refresh</tt> command refreshes all repositories:</p><pre> +karaf@root()> obr:url-refresh +</pre><p>You can refresh only one repository by specifying the URL as argument:</p><pre> +karaf@root()> obr:url-refresh file:/user/.m2/repository/repository.xml +</pre><p>Instead of using the URL, you can use the repository index as displayed by the <tt>obr:url-list</tt> command.<br/>To do so, you have to use the <tt>-i</tt> option:</p><pre> +karaf@root()> obr:url-refresh -i 0 +</pre><h3 id="obrurlremove"><tt>obr:url-remove</tt></h3><p>The <tt>obr:url-remove</tt> command removes an OBR repository from the OBR service.</p><p>The <tt>obr:url-remove</tt> command expects the repository URL as argument:</p><pre> +karaf@root()> obr:url-remove file:/user/.m2/repository/repository.xml +</pre><p>Instead of using the URL, you can use the repository index as displayed by the <tt>obr:url-list</tt> command.<br/>To do so, you have to use the <tt>-i</tt> option:</p><pre> +karaf@root()> obr:url-remove -i 0 +</pre><h3 id="obrlist"><tt>obr:list</tt></h3><p>The <tt>obr:list</tt> command lists all bundles available on the registered OBR repositories:</p><pre> +karaf@root()> obr:list|more +Name | Symbolic Name | Version +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +activemq-blueprint | org.apache.activemq.activemq-blueprint | 5.10.0.SNAPSHOT +activemq-camel | org.apache.activemq.activemq-camel | 5.10.0.SNAPSHOT +activemq-karaf | activemq-karaf | 5.10.0.SNAPSHOT +activemq-osgi | org.apache.activemq.activemq-osgi | 5.10.0.SNAPSHOT +Apache Aries Application API | org.apache.aries.application.api | 1.0.1.SNAPSHOT +... +</pre><h3 id="obrinfo"><tt>obr:info</tt></h3><p>The <tt>obr:info</tt> command displays the details about bundles available on the OBR service. Especially, it provides details about<br/>capabilities and requirements of bundles.</p><p>The <tt>obr:info</tt> command expects a bundle symbolic name as argument:</p><pre> +karaf@root()> obr:info org.apache.karaf.wrapper.core +------------------------------- +Apache Karaf :: Wrapper :: Core +------------------------------- +id: org.apache.karaf.wrapper.core/3.0.0 +description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System. +documentation: http://www.apache.org/ +symbolicname: org.apache.karaf.wrapper.core +presentationname: Apache Karaf :: Wrapper :: Core +license: http://www.apache.org/licenses/LICENSE-2.0.txt +uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/3.0.0/org.apache.karaf.wrapper.core-3.0.0.jar +size: 1281352 +version: 3.0.0 +Requires: + service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0)) + package:(&(package=javax.management)) + package:(&(package=org.apache.karaf.wrapper)) + package:(&(package=org.apache.karaf.wrapper.management)) + package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0))) + package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0))) +Capabilities: + bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=3.0.0} + service:{service=org.apache.karaf.wrapper.WrapperService} + package:{package=org.apache.karaf.wrapper, version=3.0.0} + package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=3.0.0} +</pre><h3 id="obrsource"><tt>obr:source</tt></h3><p>In addition of the bundles executable, the OBR service can also store the bundles sources.</p><p>The <tt>obr:source</tt> command check the source URL in the OBR metadata for a given bundle, and download the sources on a target folder:</p><pre> +karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core +</pre><h3 id="obrresolve"><tt>obr:resolve</tt></h3><p>The <tt>obr:resolve</tt> command displays the resolution output for a given set of requirements. Actually, it show the bundles providing<br/>the capabilities to match the requirements. It's what the OBR service does when executing <tt>obr:deploy</tt>.</p><p>Optionally, the <tt>obr:resolve</tt> command can deploy the bundles as the <tt>obr:deploy</tt> command does.</p><p>For instance, to know the OBR bundle resolving the <tt>org.apache.karaf.wrapper</tt> package requirement, you can do:</p><pre> +karaf@root()> obr:resolve package=org.apache.karaf.wrapper +Required resource(s): +--------------------- + Apache Karaf :: Wrapper :: Core (3.0.0) +</pre><h3 id="obrfind"><tt>obr:find</tt></h3><p>The <tt>obr:find</tt> command is similar to the <tt>obr:resolve</tt> one. It displays the bundles resolving the provided requirements, with details.</p><p>For instance, to find the OBR bundle providing the <tt>org.apache.karaf.wrapper</tt> package, you can do:</p><pre> +karaf@root()> obr:find package=org.apache.karaf.wrapper +------------------------------- +Apache Karaf :: Wrapper :: Core +------------------------------- +id: org.apache.karaf.wrapper.core/3.0.0 +description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System. +documentation: http://www.apache.org/ +symbolicname: org.apache.karaf.wrapper.core +presentationname: Apache Karaf :: Wrapper :: Core +license: http://www.apache.org/licenses/LICENSE-2.0.txt +uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/3.0.0/org.apache.karaf.wrapper.core-3.0.0.jar +size: 1281352 +version: 3.0.0 +Requirements: + service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0)) + package:(&(package=javax.management)) + package:(&(package=org.apache.karaf.wrapper)) + package:(&(package=org.apache.karaf.wrapper.management)) + package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0))) + package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0))) + package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0))) +Capabilities: + bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=3.0.0} + service:{service=org.apache.karaf.wrapper.WrapperService} + package:{package=org.apache.karaf.wrapper, version=3.0.0} + package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=3.0.0} +</pre><h3 id="obrdeploy"><tt>obr:deploy</tt></h3><p>The <tt>obr:deploy</tt> command installs a bundle from the OBR repository, including all bundles required to satisfy the bundle requirements.</p><pre> +karaf@root()> obr:deploy org.ops4j.pax.web.samples.helloworld-hs +Target resource(s): +------------------- + OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT) + +Required resource(s): +--------------------- + Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT) + OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT) + +Deploying...done. +</pre><p>By default, the bundles are just installed, not started. You can use the <tt>-s</tt> option to start the bundles.</p><h2 id="obrstart"><tt>obr:start</tt></h2><p>The <tt>obr:start</tt> command does the same as <tt>obr:deploy -s</tt> command. It installs the bundle (and all required bundles to<br/>satisfy the requirements) and starts all installed bundles.</p><h2 id="JMXObrMBean">JMX ObrMBean</h2><p>On the JMX layer, Apache Karaf provides a MBean dedicated to the management of the OBR service: the ObrMBean.</p><p>The ObjectName to use is <tt>org.apache.karaf:type=obr,name=*</tt>.</p><h3 id="Attributes">Attributes</h3><p>The <tt>Urls</tt> attribute provides the list of registered OBR repositories URLs.</p><p>The <tt>Bundles</tt> attribute provides a tabular data containing all bundles available on the registered OBR repositories.</p><h3 id="Operations">Operations</h3><ul><li><tt>addUrl(url)</tt> registers the OBR repository using the <tt>url</tt> to the <tt>repository.xml</tt> .</li><li><tt>removeUrl(url)</tt> removes the OBR repository at the given <tt>url</tt>.</li><li><tt>refreshUrl(url)</tt> refreshes the OBR repository at the given <tt>url</tt>.</li><li><tt>deployBundle(name)</tt> deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service. The bundles are not automatically started.</li><li><tt>deployBundle(name, start, deployOptional)</tt> deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service.<p> If <tt>start</tt> is <tt>true</tt>, the bundles are automatically started. If <tt>deployOptional</tt> is <tt>true</tt>, even the optional requirements will be resolved<br/> by the OBR service (meaning installing more bundles to satisfy the optional requirements).</p><h2 id="ApacheKarafCave">Apache Karaf Cave</h2><p>In addition of being an OBR client, Apache Karaf can act as an OBR repositories server, thanks to Apache Karaf Cave.</p><p>See the <a href="http://karaf.apache.org/index/su bprojects/cave.html">Apache Karaf Cave sub-project</a> for details.</p></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
Modified: karaf/site/production/manual/latest/users-guide/provisioning-schema.html URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/provisioning-schema.html?rev=1553356&r1=1553355&r2=1553356&view=diff ============================================================================== --- karaf/site/production/manual/latest/users-guide/provisioning-schema.html (original) +++ karaf/site/production/manual/latest/users-guide/provisioning-schema.html Wed Dec 25 06:31:51 2013 @@ -8,7 +8,7 @@ <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.0-SNAPSHOT Guides + Apache Karaf 3.0.1-SNAPSHOT Guides </title> </head> <body> @@ -93,7 +93,7 @@ <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="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><li><a hre f="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.html">Developer Com mands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers- guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3> + <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="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installation</a></li><li><a href="directory-structure.html">Directory structure</a></li><li><a href="start-stop.html">Start, stop, restart, connect</a></li><li><a href="wrapper.html">Integration in the operating system: the Service Wrapper</a></li><li><a href="console.html">Console</a></li><li><a href="remote.html">Remote</a></li><li><a href="log.html">Log</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="urls.html">Artifacts repositories and URLs</a></li><li><a href="provisioning.html">Provisioning and features</a></li><li><a href="deployers.html">Deployers</a></li><li><a href="kar.html">KAR</a></li><li><a href="instances.html">Instances</a></li><li><a href="security.html">Security</a></li><li><a href="obr.html">OBR</a></li><li><a href="enterprise.html">Enterprise</a><ul><li><a href="webcontainer.html">WebContainer (JSP/Servlet)</a></li><li><a href="jndi.html">Naming (JNDI)</a></li><li><a href="jta.html">Transaction (JTA)</a></li><li><a href="jdbc.html">DataSource (JDBC)</a></li><li><a href="jms.html">MOM (JMS)</a></li><li><a href="jpa.html">Persistence (JPA)</a></li><li><a href="ejb.html">EJB</a></li><li><a href="cdi.html">CDI</a></li><li><a href="failover.html">HA/failover and cluster</a></li></ul></li><li><a href="monitoring.html">Monitoring and Management using JMX</a></li><li><a href="webconsole.html">WebConsole</a></li><li><a href="tuning.html">Tuning</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/developer-commands.html">Developer command s</a></li><li><a href="../developers-guide/scripting.html">Scripting</a></li><li><a href="../developers-guide/connect.html">Programmatically connect</a></li><li><a href="../developers-guide/branding.html">Branding</a></li><li><a href="../developers-guide/extending.html">Extending</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Karaf Maven plugin</a></li><li><a href="../developers-guide/custom-distribution.html">Custom distribution</a></li><li><a href="../developers-guide/services.html">OSGi services</a></li><li><a href="../developers-guide/creating-bundles.html">Create OSGi bundle</a></li><li><a href="../developers-guide/blueprint.html">Blueprint</a></li><li><a href="../developers-guide/cdi.html">CDI</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging, Profiling</a></li><li><a href="../developers-guide/writing-tests.html">Integration testing</a></li><li><a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3> </div> </div> </div> @@ -101,7 +101,11 @@ </td> <td height="100%" width="100%"> <div class="wiki-content"> -<h1 id="XMLSchemaforprovisioning">XML Schema for provisioning</h1><p>The following schema can be found in Karaf sources. It is also available publicly at http://karaf.apache.org/xmlns/features/v1.0.0.</p><div class="syntax"><div class="highlight"><pre><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span>
<span class="c"><!--</span>
<span class="c"> Licensed to the Apache Software Foundation (ASF) under one or more</span>
<span class="c"> contributor license agreements. See the NOTICE file distributed with</span>
<span class="c"> this work for additional information regarding copyright ownership.</span>
<span class="c"> The ASF licenses this file to You under the Apache License, Version 2.0</span>
<span class="c"> (the "License"); you may not use this file except in compliance with</span>
<span class="c"> the License. You may obtain a copy of the License at</span>
 ;
<span class="c"> http://www.apache.org/licenses/LICENSE-2.0</span>

<span class="c"> Unless required by applicable law or agreed to in writing, software</span>
<span class="c"> distributed under the License is distributed on an "AS IS" BASIS,</span>
<span class="c"> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<span class="c"> See the License for the specific language governing permissions and</span>
<span class="c"> limitations under the License.</span>

<span class="c">--></span>
<span class="nt"><xs:schema</span> <span class="na">elementFormDefault=</span><span class="s">"qualified"</span>
 <span class="na">targetNamespace=</span><span class="s">"http://karaf.apache.org/xmlns/features/v1.0.0"</span>
 <span class="na">xmlns:tns=</span><span class="s">"http://karaf.apache.org/xmlns/features/v1.0. 0"</span>
 <span class="na">xmlns:xs=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span><span class="nt">></span>

 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Karaf features mechanism. For documentation please visit the</span>
<span class="cp"><a href="http://karaf.apache.org/">Karaf website</a>.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>

 <span class="nt"><xs:complexType</span> <span class="na">name=</span><span class="s">"features"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</spa n>
<span class="cp">Root element of the Feature definition. It contains an optional attribute for</span>
<span class="cp">designating the name of the repository of this feature. The Karaf shell will</span>
<span class="cp">show the repository name when displaying information about the feature.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:choice</span> <span class="na">minOccurs=</span><span class="s">"0"</span> <span class="na">maxOccurs=</span><span class="s">"unbounded"</span><span class="nt">></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"repository"</span> <span class="na">type=</span><span class="s">"xs:anyURI"</span><span class="nt">></span>
 <span class="nt"><xs: annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Additional repositories where dependencies are stored.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:element></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"feature"</span> <span class="na">type=</span><span class="s">"tns:feature"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Feature definition.</span>
<span class="cp"> ]]></span><span class="n t"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:element></span>
 <span class="nt"></xs:choice></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"name"</span> <span class="na">type=</span><span class="s">"xs:string"</span> <span class="nt">/></span>
 <span class="nt"></xs:complexType></span>

 <span class="nt"><xs:complexType</span> <span class="na">name=</span><span class="s">"feature"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Definition of the Feature.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span >
 <span class="nt"></xs:annotation></span>
 ><span class="nt"><xs:choice</span> <span class="na">minOccurs=</span><span >class="s">"0"</span> <span class="na">maxOccurs=</span><span >class="s">"unbounded"</span><span class="nt">></span>
 > <span class="nt"><xs:element</span> <span >class="na">name=</span><span class="s">"details"</span> <span >class="na">minOccurs=</span><span class="s">"0"</span> <span >class="na">type=</span><span class="s">"xs:string"</span><span >class="nt">></span>
 <span >class="nt"><xs:annotation></span>
 <span >class="nt"><xs:documentation></span><span >class="cp"><![CDATA[</span>
<span class="cp">The help text shown >for this feature when using the feature:info console >command.</span>
<span class="cp"> >]]></span>
 <span class="nt">< ;/xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:element></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"config"</span> <span class="na">type=</span><span class="s">"tns:config"</span> <span class="nt">/></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"configfile"</span> <span class="na">type=</span><span class="s">"tns:configFile"</span> <span class="nt">/></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"feature"</span> <span class="na">type=</span><span class="s">"tns:dependency"</span> <span class="nt">/></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"bundle&quo t;</span> <span class="na">type=</span><span class="s">"tns:bundle"</span> <span class="nt">/></span>
 <span class="nt"></xs:choice></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"name"</span> <span class="na">type=</span><span class="s">"tns:featureName"</span> <span class="na">use=</span><span class="s">"required"</span> <span class="nt">/></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"version"</span> <span class="na">type=</span><span class="s">"xs:string"</span> <span class="na">default=</span><span class="s">"0.0.0"</span> <span class="nt">/></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"description"</span> <span class="na">type=</span><span class="s">"xs:string"</span> <span class="nt">/></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"resolver"</span> <span class="na">type=</span><span class="s">"tns:resolver"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Optional alternative resolver to use for determining the list of bundles to install for a given feature.</span>
<span class="cp"> ]]></span>
 <span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"install"</span> <span class="na">type=</span><span class="s">&qu ot;tns:install"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">If true, marks that the feature should start automatically when placed in the deploy folder.</span>
<span class="cp"> ]]></span>
 <span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"start-level"</span> <span class="na">type=</span><span class="s">"xs:int"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><! [CDATA[</span>
<span class="cp">Set this attribute to have an OSGi start level for the bundles in this feature different</span>
<span class="cp">from the default start level defined in Karaf's config.properties.</span>
<span class="cp"> ]]></span>
 <span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"region"</span> <span class="na">type=</span><span class="s">"xs:string"</span><span class="nt">/></span>
 <span class="nt"></xs:complexType></span>

 <span class="nt"><xs:complexType</span> <span class="na">name=</span><span class="s">"bundle"</span><span class="nt">></span>
 <span class="nt"><xs:annotation> </span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Deployable element to install.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:simpleContent></span>
 <span class="nt"><xs:extension</span> <span class="na">base=</span><span class="s">"xs:anyURI"</span><span class="nt">></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"start-level"</span> <span class="na">type=</span><span class="s">"xs:int"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
< span class="cp">Set this attribute to have an OSGi start level for this bundle different</span>
<span class="cp">from the default start level defined in Karaf's config.properties.</span>

<span class="cp"> ]]></span>
 <span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"start"</span> <span class="na">type=</span><span class="s">"xs:boolean"</span> <span class="na">default=</span><span class="s">"true"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
 <span class="cp">If false, leaves the bundle in resolved state rather than the default active state.</span>
<span class="cp"> ]]></span>
 <span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"dependency"</span> <span class="na">type=</span><span class="s">"xs:boolean"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Mark this bundle as a dependency for the resolver.</span>
<span class="cp"> ]]></span>
 <span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>
 <span class="nt"></xs:extension></span>
 <span class="nt"></xs:simpleContent></span>
 <span class="nt"></xs:complexType></span>

 <span class="nt"><xs:complexType</span> <span class="na">name=</span><span class="s">"dependency"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Dependency of feature.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:simpleContent></span>� 00A; <span class="nt"><xs:extension</span> <span class="na">base=</span><span class="s">"tns:featureName"</span><span class="nt">></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"version"</span> <span class="na">type=</span><span class="s">"xs:string"</span> <span class="na">default=</span><span class="s">"0.0.0"</span> <span class="nt">/></span>
 <span class="nt"></xs:extension></span>
 <span class="nt"></xs:simpleContent></span>
 <span class="nt"></xs:complexType></span>

 <span class="nt"><xs:complexType</span> <span class="na">name=</span><span class="s">"config"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>� 0A;<span class="cp">Configuration entries which should be created during feature installation. This</span>
<span class="cp">configuration may be used with OSGi Configuration Admin. The element content is</span>
<span class="cp">read in as a properties file.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:simpleContent></span>
 <span class="nt"><xs:extension</span> <span class="na">base=</span><span class="s">"xs:string"</span><span class="nt">></span>
 <span class="nt"><xs:attribute</span> <span class="na">name=</span><span class="s">"name"</span> <span class="na">type=</span><span class="s">"xs:string"</span> <span class="na">use=</span><span class="s">"required"</span> <span class="nt">/></span>
 <sp an class="nt"></xs:extension></span>
 <span class="nt"></xs:simpleContent></span>
 <span class="nt"></xs:complexType></span>

 <span class="nt"><xs:complexType</span> <span class="na">name=</span><span class="s">"configFile"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Additional configuration files which should be created during feature installation.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:simpleContent></span>
 <span class="nt"><xs:extension</span> <span class="na">base=</span><span class="s">"xs:anyURI"</span><span class="nt">></span >
 <span class="nt"><xs:attribute</span> <span >class="na">name=</span><span class="s">"finalname"</span> <span >class="na">type=</span><span class="s">"xs:string"</span> <span >class="na">use=</span><span class="s">"required"</span><span >class="nt">></span>
 <span >class="nt"><xs:annotation></span>
 <span >class="nt"><xs:documentation></span><span >class="cp"><![CDATA[</span>
<span class="cp">The final destination >path and name for the configuration file (relative to the >KARAF_BASE).</span>
<span class="cp"> >]]></span><span class="nt"></xs:documentation></span>
 > <span class="nt"></xs:annotation></span>
 > <span class="nt"></xs:attribute></span>
 ><span class="nt"><xs:attribute</span> <span class="na">name=</span><span >class="s">"o verride"</span> <span class="na">type=</span><span class="s">"xs:boolean"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">If the configFile already exists at the finalname location, whether or not to replace it.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"></xs:attribute></span>

 <span class="nt"></xs:extension></span>
 <span class="nt"></xs:simpleContent></span>
 <span class="nt"></xs:complexType></span>

 <span class="nt"><xs:simpleType</span> <span class="na">name=</span><span class="s">" featureName"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Feature name should be non empty string.</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:restriction</span> <span class="na">base=</span><span class="s">"xs:string"</span><span class="nt">></span>
 <span class="nt"><xs:minLength</span> <span class="na">value=</span><span class="s">"1"</span> <span class="nt">/></span>
 <span class="nt"></xs:restriction></span>
 <span class="nt"></xs:simpleType></span>

 <span class="nt"><xs:simpleType</span> <span class="na">name=</span><span class="s">&q uot;resolver"</span><span class="nt">></span>
 <span class="nt"><xs:annotation></span>
 <span class="nt"><xs:documentation></span><span class="cp"><![CDATA[</span>
<span class="cp">Resolver to use. Karaf will look for OSGi service which has following properties:</span>
<span class="cp">objectClass: org.apache.karaf.features.Resolver</span>
<span class="cp">name: the value</span>
<span class="cp"> ]]></span><span class="nt"></xs:documentation></span>
 <span class="nt"></xs:annotation></span>
 <span class="nt"><xs:restriction</span> <span class="na">base=</span><span class="s">"xs:string"</span><span class="nt">></span>
 <span class="nt"><xs:minLength</span> <span class="na">value=</span><span class="s">"1"</span> <span class="nt">/></span>
 <span class="nt"></xs:restriction></span >
 <span class="nt"></xs:simpleType></span>
 <span >class="nt"><xs:simpleType</span> <span class="na">name=</span><span >class="s">"install"</span><span class="nt">></span>
 > <span class="nt"><xs:annotation></span>
 <span >class="nt"><xs:documentation></span><span >class="cp"><![CDATA[</span>
<span class="cp">Installation mode. Can >be either manual or auto. Specifies whether the feature should be >automatically installed when</span>
<span class="cp">dropped inside >the deploy folder. Note: This attribute doesn't affect feature >descriptors that are installed from the</span>
<span >class="cp">command line or as part of the >org.apache.karaf.features.cfg.</span>
<span class="cp"> >]]></span><span class="nt"></xs:documentation></span>
 ><span class="nt"></xs:annotation></span>
 <span >class="nt"><xs:restriction</span> <span class="na">base=</span><span class="s">"xs:string"</span><span class="nt">></span>
 <span class="nt"><xs:minLength</span> <span class="na">value=</span><span class="s">"1"</span> <span class="nt">/></span>
 <span class="nt"></xs:restriction></span>
 <span class="nt"></xs:simpleType></span>
 <span class="nt"><xs:element</span> <span class="na">name=</span><span class="s">"features"</span> <span class="na">type=</span><span class="s">"tns:features"</span> <span class="nt">/></span>

<span class="nt"></xs:schema></span>
</pre></div>
</div> +<h1 id="FeaturesXMLSchemasprovisioning">Features XML Schemas (provisioning)</h1><p>Apache Karaf 3.0.0 supports different versions of the features XML schemas.</p><p>The features XML schema can be found directly in the Apache Karaf sources, in the <tt>features/core</tt> module:</p><pre> +features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.0.xsd +features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.1.0.xsd +features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.0.0.xsd [... 5 lines stripped ...]
