sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Sling Website > JCR Installer (jcr.jcrinstall and osgi.installer)
Date Wed, 26 Aug 2009 15:00:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=SLINGxSITE&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">JCR
Installer (jcr.jcrinstall and osgi.installer)</a></h2>
    <h4>Page  <b>added</b> by             <a href="">Bertrand
    <div class="notificationGreySide">
         <h1><a name="JCRInstaller%28jcr.jcrinstallandosgi.installer%29-Overview"></a>Overview</h1>
<p>The JCR installer modules install OSGi bundles and configurations found in the JCR

<p>The goal is to allow Sling applications to be distributed as "content packages",
which install additional services and configurations when copied to the JCR repository.</p>

<h1><a name="JCRInstaller%28jcr.jcrinstallandosgi.installer%29-Example"></a>Example</h1>
<p>Here's a quick walkthrough of the JCR installer functionality.</p>

<h2><a name="JCRInstaller%28jcr.jcrinstallandosgi.installer%29-Installation"></a>Installation</h2>
<p>Start the Sling <a href=""
rel="nofollow">launchpad/app</a> and install and start the following additional bundles:</p>
	<li>RunMode service (<a href=""
	<li>OSGi installer service (<a href=""
	<li>JCR installer service (<a href=""

<p>To watch the logs produced by these modules, you can filter <tt>sling/logs/error.log</tt>
using <tt>egrep 'jcrinstall|osgi.installer'</tt>.</p>

<h2><a name="JCRInstaller%28jcr.jcrinstallandosgi.installer%29-Installandremoveabundle"></a>Install
and remove a bundle</h2>
<p>We'll use the <a href=""
rel="nofollow">Knopflerfish Desktop</a> bundle for this example, it is convenient
as it displays a graphical user interface when started.</p>

<p>We use <tt>curl</tt> to create content, to make it easy to reproduce
the example by copying and pasting the <tt>curl</tt> commands. Any other way to
create content in the repository will work, of course.</p>

<p>By default, JCRinstall picks up bundles found in folders named <em>install</em>
under <tt>/libs</tt> and <tt>/apps</tt>, so we start by creating such
a folder:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
<pre>curl -X MKCOL  http://admin:admin@localhost:8888/apps/jcrtest
curl -X MKCOL  http://admin:admin@localhost:8888/apps/jcrtest/install

<p>And we copy the bundle to install in that folder (a backslash in command lines means
_continued on next line):</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
<pre>curl -T desktop_awt_all-2.0.0.jar \

<p>That's it. After 2-3 seconds, the bundle should be picked up by JCRinstall, installed
and started. If this works you'll see a small <em>Knopflerfish Desktop</em> window
on your desktop, and Sling's OSGi console can of course be used to check the details.</p>

<p>Removing the bundle from the repository will cause it to be uninstalled, so:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
<pre>curl -X DELETE \

<p>Should cause the <em>Knopflerfish Desktop</em> window to disappear as
the bundle is uninstalled.</p>

<p><b>TODO:</b> document folder priorities (/apps over /libs), SNAPSHOT
handling, bundle start retries.</p>

<h2><a name="JCRInstaller%28jcr.jcrinstallandosgi.installer%29-Install%2Cmodifyandremoveaconfiguration"></a>Install,
modify and remove a configuration</h2>

    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message