You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2015/04/20 15:08:15 UTC

svn commit: r948398 - in /websites/staging/sling/trunk/content: ./ documentation/development.html documentation/development/getting-and-building-sling.html documentation/development/slingstart.html

Author: buildbot
Date: Mon Apr 20 13:08:15 2015
New Revision: 948398

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/development.html
    websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html
    websites/staging/sling/trunk/content/documentation/development/slingstart.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Apr 20 13:08:15 2015
@@ -1 +1 @@
-1674748
+1674837

Modified: websites/staging/sling/trunk/content/documentation/development.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development.html (original)
+++ websites/staging/sling/trunk/content/documentation/development.html Mon Apr 20 13:08:15 2015
@@ -95,6 +95,7 @@
 <p>Look here for more information on developper support when your are using Sling to build your own applications.</p>
 <ul>
 <li><a href="/documentation/development/getting-and-building-sling.html">Getting and Building Sling</a></li>
+<li><a href="/documentation/development/slingstart.html">Defining and Launching a Sling based Application</a></li>
 <li><a href="/documentation/development/embedding-sling.html">Embedding Sling</a></li>
 <li><a href="/documentation/development/logging.html">Logging</a></li>
 <li><a href="/documentation/development/client-request-logging.html">Client Request Logging</a></li>
@@ -131,7 +132,7 @@
 <li>A Sonar analysis is available on the <a href="https://analysis.apache.org/dashboard/index/org.apache.sling:sling-builder">analysis.apache.org</a> server.</li>
 </ul>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1661084 by kwin on Fri, 20 Feb 2015 10:35:51 +0000
+        Rev. 1674837 by cziegeler on Mon, 20 Apr 2015 13:08:02 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project

Modified: websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html (original)
+++ websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html Mon Apr 20 13:08:15 2015
@@ -114,7 +114,7 @@ $ <span class="n">java</span> $<span cla
 <h2 id="prerequisites">Prerequisites</h2>
 <p>Before you begin, you need to have the following tools installed on your system:</p>
 <ul>
-<li>Java 6 or higher; Java 6 recommended</li>
+<li>Java 7 or higher</li>
 <li><a href="http://maven.apache.org">Maven</a> 3.0.4 or later; enforced by the Sling parent pom</li>
 </ul>
 <p>If you want to set up Eclipse (not required to build Sling) you'll also need the following installed:</p>
@@ -224,7 +224,7 @@ $ mvn -s /dev/null clean install</p>
 <li>
 <p>Enter the <code>launchpad/builder</code> directory and launch Sling for the first time</p>
 <p>$ cd launchpad/builder
-$ java -jar target/org.apache.sling.launchpad-*-standalone.jar -c test -f -</p>
+$ java -jar target/org.apache.sling.launchpad-*.jar -c test -f -</p>
 </li>
 </ol>
 <div class="note">
@@ -305,7 +305,7 @@ For more information on this see the <a
 </ul>
 <p>If adding dependencies to the poms, run mvn eclipse:eclipse again and refresh the project in Eclipse. Debugging works as described above.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1600116 by olli on Wed, 4 Jun 2014 11:35:25 +0000
+        Rev. 1674837 by cziegeler on Mon, 20 Apr 2015 13:08:02 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project

Modified: websites/staging/sling/trunk/content/documentation/development/slingstart.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development/slingstart.html (original)
+++ websites/staging/sling/trunk/content/documentation/development/slingstart.html Mon Apr 20 13:08:15 2015
@@ -90,8 +90,9 @@
       
       
       <h1>The Apache Sling Provisioning Model and Apache SlingStart</h1>
-      <p>The Apache Sling provisioning model is a model to describe OSGi based application. It can also be used to define a partial application aka feature or subsystem.</p>
-<p>The model is used by various tooling, e.g. the slingstart-maven-plugin to build an executable application or web application.</p>
+      <p>The Apache Sling provisioning model is a model to describe OSGi based application. It can also be used to define a partial application aka feature (or subsystem in OSGi terms).</p>
+<p>The model is describing an instance, it is not directly related to any particular tooling or packaging/provisioning vehicle.</p>
+<p>For Apache Maven users, the slingstart-maven-plugin uses the model to create an executable application and/or a web application based on the model. Sling's Launchpad is defined using the model and built by this Maven plugin.</p>
 <h2 id="the-model">The Model</h2>
 <p>The model is a simple API consisting of data objects:</p>
 <ul>
@@ -117,10 +118,10 @@ Each run mode is associated with a set o
 <h3 id="start-levels">Start Levels</h3>
 <p>Each run mode has start levels. These start levels correspond to OSGi start levels. The default start level has the level 0 and should be used for all non bundle artifacts. If a non bundle artifact is configured with a start level, it's still provisioned, however the start level information might not have any meaning.</p>
 <h3 id="artifacts">Artifacts</h3>
-<p>An artifact is defined by maven coordinates, that is group id, artifact id and version. Type and classifier can be specified, too. Type defaults to "jar". Although the maven way of referring to an artifact is used, the model is in no way tied to Maven and can be used with any tooling.</p>
+<p>An artifact is defined by Maven coordinates, that is group id, artifact id and version. Type and classifier can be specified, too. Type defaults to "jar". Although the maven way of referring to an artifact is used, the model is in no way tied to Maven and can be used with any tooling.</p>
 <h3 id="configurations">Configurations</h3>
-<p>A configuration has a pid, or a factory pid and an alias and of course the properties of the configuration object.
-Special configurations can be marked with a leading ":" of the pid. Special configurations are not added to the OSGi config admin. There are some predefined special configurations</p>
+<p>A configuration has a pid, or a factory pid and an alias and of course the properties of the configuration object.</p>
+<p>Special configurations can be marked with a leading ":" of the pid. Special configurations are not added to the OSGi config admin. There are some predefined special configurations</p>
 <ul>
 <li>:web.xml This configuration must be part of the :webapp runmode and contains a complete web.xml for the web application</li>
 <li>:bootstrap This configuration must be part of either the :boot, :base, :standalone, or :webapp run mode and define the contents for bootstrap command file executed by Launchpad.</li>
@@ -128,7 +129,7 @@ Special configurations can be marked wit
 <h3 id="settings">Settings</h3>
 <p>Settings are key value pairs that are added to the framework properties. For now, only settings for the run modes :boot, :base, :standalone, or :webapp are supported.</p>
 <h3 id="features">Features</h3>
-<p>Features group run modes and defined a special functionality. The model also defines two special features:</p>
+<p>Features group run modes and define a special functionality. The model also defines two special features:</p>
 <ul>
 <li>:launchpad This feature contains the dependency to Sling's launchpad artifact to be used. This mode is required if Apache Sling Launchpad should be used to start the application.</li>
 <li>:boot The artifacts that are installed before the framework is started. They're used to bootstrap the system.</li>
@@ -144,6 +145,7 @@ Special configurations can be marked wit
        <span class="err">org.apache.sling/eventadmin/${eventadmin.version}</span>
        <span class="err">org.apache.sling/metatype/${metatype.version}</span>
        <span class="err">org.apache.sling/coordinator/3.0.0</span>
+
     <span class="k">[configurations]</span>
        <span class="err">org.apache.sling.eventadmin</span>
           <span class="na">useQueue</span><span class="o">=</span><span class="s">true</span>
@@ -168,8 +170,65 @@ Special configurations can be marked wit
           <span class="na">useQueue</span><span class="o">=</span><span class="s">true</span>
 <span class="s">          ignoreTopics=[&quot;myTopic&quot;]</span>
 </pre></div>
+
+
+<h3 id="comments">Comments</h3>
+<p>Each object in the model can be annotated with comments. A comment is a line starting with a '#'. Leading spaces are ignored.</p>
+<h3 id="configurations-in-the-model-file">Configurations in the Model file</h3>
+<p>Configuration names are related to the PID and factory PID. The structure of the name is as follows:</p>
+<div class="codehilite"><pre><span class="n">name</span> <span class="p">::=</span> <span class="o">&lt;</span><span class="n">pid</span><span class="o">&gt;</span> <span class="p">(</span> <span class="s">&#39;-&#39;</span> <span class="o">&lt;</span><span class="n">subname</span><span class="o">&gt;</span> <span class="p">)</span>
+</pre></div>
+
+
+<p>If the form is just <code>&lt;pid&gt;</code>, the configuration contains the properties for a Managed Service. The <code>&lt;pid&gt;</code> is then the PID of the Managed Service. See the Configuration Admin service for details.</p>
+<p>When a Managed Service Factory is used, the situation is different. The <code>&lt;pid&gt;</code> part then describes the PID of the Managed Service Factory. You can pick any <code>&lt;subname&gt;</code> which is used as a unique alias. For example:</p>
+<div class="codehilite"><pre><span class="c"># Configuration for Managed Service com.acme.xyz</span>
+<span class="n">com</span><span class="p">.</span><span class="n">acme</span><span class="p">.</span><span class="n">xyz</span> <span class="o">//</span> 
+<span class="c"># Managed Service Factory, creates an instance for com.acme.abc</span>
+<span class="n">com</span><span class="p">.</span><span class="n">acme</span><span class="p">.</span><span class="n">abc</span><span class="o">-</span><span class="n">default</span>
+</pre></div>
+
+
+<h3 id="default-configuration-format">Default Configuration Format</h3>
+<p>Configurations use by default the format of the Apache Felix ConfigAdmin implementation. It allows to specify the type and cardinality of a configuration property and is not limited to string values.</p>
+<p>The first line of such a file might start with a comment line (a line starting with a #). Comments within the file are not allowed.</p>
+<p>The format is:</p>
+<div class="codehilite"><pre><span class="n">file</span> <span class="p">::=</span> <span class="p">(</span><span class="n">comment</span><span class="p">)</span> <span class="p">(</span><span class="n">header</span><span class="p">)</span> <span class="o">*</span>
+<span class="n">comment</span> <span class="p">::=</span> <span class="s">&#39;#&#39;</span> <span class="o">&lt;</span><span class="n">any</span><span class="o">&gt;</span>
+<span class="n">header</span> <span class="p">::=</span> <span class="n">prop</span> <span class="s">&#39;=&#39;</span> <span class="n">value</span>
+<span class="n">prop</span> <span class="p">::=</span> <span class="n">symbolic</span><span class="o">-</span><span class="n">name</span> <span class="o">//</span> 1<span class="p">.</span>4<span class="p">.</span>2 <span class="n">of</span> <span class="n">OSGi</span> <span class="n">Core</span> <span class="n">Specification</span>
+<span class="n">symbolic</span><span class="o">-</span><span class="n">name</span> <span class="p">::=</span> <span class="n">token</span> <span class="p">{</span> <span class="s">&#39;.&#39;</span> <span class="n">token</span> <span class="p">}</span> 
+<span class="n">token</span> <span class="p">::=</span> <span class="p">{</span> <span class="p">[</span> 0<span class="p">..</span>9 <span class="p">]</span> <span class="o">|</span> <span class="p">[</span> <span class="n">a</span><span class="p">..</span><span class="n">z</span> <span class="p">]</span> <span class="o">|</span> <span class="p">[</span> <span class="n">A</span><span class="p">..</span><span class="n">Z</span> <span class="p">]</span> <span class="o">|</span> <span class="s">&#39;_&#39;</span> <span class="o">|</span> <span class="s">&#39;-&#39;</span> <span class="p">}</span>
+<span class="n">value</span> <span class="p">::=</span> <span class="p">[</span> <span class="n">type</span> <span class="p">]</span> <span class="p">(</span> <span class="s">&#39;[&#39;</span> <span class="n">values</span> <span class="s">&#39;]&#39;</span> <span class="o">|</span> <span class="s">&#39;(&#39;</span> <span class="n">values</span> <span class="s">&#39;)&#39;</span> <span class="o">|</span> <span class="n">simple</span> <span class="p">)</span> 
+<span class="n">values</span> <span class="p">::=</span> <span class="n">simple</span> <span class="p">{</span> <span class="s">&#39;,&#39;</span> <span class="n">simple</span> <span class="p">}</span> 
+<span class="n">simple</span> <span class="p">::=</span> <span class="s">&#39;&quot;&#39;</span> <span class="n">stringsimple</span> <span class="s">&#39;&quot;&#39;</span>
+<span class="n">type</span> <span class="p">::=</span> <span class="o">&lt;</span>1<span class="o">-</span><span class="n">char</span> <span class="n">type</span> <span class="n">code</span><span class="o">&gt;</span>
+<span class="n">stringsimple</span> <span class="p">::=</span> <span class="o">&lt;</span><span class="n">quoted</span> <span class="n">string</span> <span class="n">representation</span> <span class="n">of</span> <span class="n">the</span> <span class="n">value</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<p>The 1 character type code is one of:</p>
+<ul>
+<li>'T' : simple string</li>
+<li>'I' : Integer</li>
+<li>'L' : Long</li>
+<li>'F' : Float</li>
+<li>'D' : Double</li>
+<li>'X' : Byte</li>
+<li>'S' : Short</li>
+<li>'C' : Character</li>
+<li>'B' : Boolean</li>
+</ul>
+<h3 id="configurations-defined-through-properties">Configurations Defined through Properties</h3>
+<p>While the default configuration form is very powerful, it might also sometimes be a little bit too heavy to specify a configuration. For these usage cases, the configuration can be described as properties:</p>
+<div class="codehilite"><pre><span class="n">com</span><span class="p">.</span><span class="n">acme</span><span class="p">.</span><span class="n">xyz</span> <span class="p">[</span><span class="n">format</span><span class="p">=</span><span class="k">properties</span><span class="p">]</span>     
+    <span class="n">ftp</span><span class="p">.</span><span class="n">port</span> <span class="p">=</span> 21
+</pre></div>
+
+
+<p>Notice that this model only supports string properties. Therefore the service consuming the configuration needs to be able to adapt a string value to the correct type.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1628963 by cziegeler on Thu, 2 Oct 2014 12:56:19 +0000
+        Rev. 1674837 by cziegeler on Mon, 20 Apr 2015 13:08:02 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project