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/10/02 23:17:09 UTC
svn commit: r967544 - in /websites/staging/sling/trunk/content: ./
documentation/development/slingstart.html
Author: buildbot
Date: Fri Oct 2 21:17:08 2015
New Revision: 967544
Log:
Staging update by buildbot for sling
Modified:
websites/staging/sling/trunk/content/ (props changed)
websites/staging/sling/trunk/content/documentation/development/slingstart.html
Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Oct 2 21:17:08 2015
@@ -1 +1 @@
-1705981
+1706489
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 Fri Oct 2 21:17:08 2015
@@ -257,20 +257,27 @@ Each run mode is associated with a set o
<li>slingfeature : This type requires a model at src/main/provisioning. It reads all text files in that directory and merges them in alphabetical order and creates a merged model which is the final artifact of this project.</li>
</ul>
<p>A model can reference other slingstart or slingfeature artifacts. When such an artifact is reference, the type needs to be specified, for example:</p>
-<p>[artifacts]
- org.apache.sling/org.apache.sling.launchpad/8-SNAPSHOT/slingstart
- org.apache.sling/org.apache.sling.launchpad.test-bundles/0.0.1-SNAPSHOT/slingfeature</p>
+<div class="codehilite"><pre><span class="k">[artifacts]</span>
+ <span class="err">org.apache.sling/org.apache.sling.launchpad/8-SNAPSHOT/slingstart</span>
+ <span class="err">org.apache.sling/org.apache.sling.launchpad.test-bundles/0.0.1-SNAPSHOT/slingfeature</span>
+</pre></div>
+
+
<p>The resulting model is a merged model, starting with the dependencies and then merging in the current model.</p>
<h2 id="model-merging">Model Merging<a class="headerlink" href="#model-merging" title="Permanent link">¶</a></h2>
<p>Two models are merged feature by feature - each feature is treated as a separate unit. Within a feature each run mode is treated separately as well. Within a run mode a model can overwrite definitions from the base model. For example, it can define a different configuration or a different version and/or start level for an artifact.</p>
<h3 id="removing-and-changing-of-artifacts">Removing and Changing of Artifacts<a class="headerlink" href="#removing-and-changing-of-artifacts" title="Permanent link">¶</a></h3>
<p>In addition, it can also remove artifacts and configurations. For this the special runmode :remove needs to be used together with all run modes the artifact or configuration is currently in.</p>
<p>Let's look at an example base model</p>
-<p>[artifacts]
- my/special/artifact/1.0.0
- commons/library/1.0.0</p>
-<p>[artifacts runModes=test]
- another/one/2.1.0</p>
+<div class="codehilite"><pre><span class="k">[artifacts]</span>
+ <span class="err">my/special/artifact/1.0.0</span>
+ <span class="err">commons/library/1.0.0</span>
+
+<span class="k">[artifacts runModes=test]</span>
+ <span class="err">another/one/2.1.0</span>
+</pre></div>
+
+
<p>Another model wants to use the above model as it's base but:</p>
<ul>
<li>Change the version of the commons library to 1.1.0 and move it to a different start level.</li>
@@ -291,21 +298,31 @@ Each run mode is associated with a set o
<p>Note that the version for removal does not play a role, it's not compared for an exact match. But please keep in mind that the remove directive needs to be specified in the same feature and run mode as the original.</p>
<h3 id="removing-and-changing-of-configurations">Removing and Changing of Configurations<a class="headerlink" href="#removing-and-changing-of-configurations" title="Permanent link">¶</a></h3>
<p>Configurations can be removed in the same way by just specifying their PID in the :remove run mode. This is the base model:</p>
-<p>[configurations]
- my.special.configuration.b
- foo="bar"
- another.special.configuration.a
- x="y"</p>
+<div class="codehilite"><pre><span class="k">[configurations]</span>
+ <span class="err">my.special.configuration.b</span>
+ <span class="na">foo</span><span class="o">=</span><span class="s">"bar"</span>
+<span class="s"> another.special.configuration.a</span>
+<span class="s"> x="y"</span>
+</pre></div>
+
+
<p>When this model is merged with the following model, the resulting model has a different configuration for my.special.configuration.b and no configuration for another.special.configuration.a:</p>
-<p>[configurations]
- my.special.configuration.b
- a="b"</p>
-<p>[configurations runModes=:remove]
- another.special.configuration.a</p>
+<div class="codehilite"><pre><span class="k">[configurations]</span>
+ <span class="err">my.special.configuration.b</span>
+ <span class="na">a</span><span class="o">=</span><span class="s">"b"</span>
+
+<span class="k">[configurations runModes=:remove]</span>
+ <span class="err">another.special.configuration.a</span>
+</pre></div>
+
+
<p>By default if a model inherits from another and uses the same configuration pid, the configuration is overwritten! In the above example, the configuration my.special.configuration.b contains a single property named "a". It is also possible to merge configurations:</p>
-<p>[configurations]
- my.special.configuration.b [mode=merge]
- a="b"</p>
+<div class="codehilite"><pre><span class="k">[configurations]</span>
+ <span class="na">my.special.configuration.b [mode</span><span class="o">=</span><span class="s">merge]</span>
+<span class="s"> a="b"</span>
+</pre></div>
+
+
<p>When the merge directive is used, the configurations are merged and the properties are applied as a delta to the base configuration. Therefore the configuration my.special.configuration.b will have two properties "a" and "foo".</p>
<h2 id="known-issues">Known Issues<a class="headerlink" href="#known-issues" title="Permanent link">¶</a></h2>
<h3 id="support-of-configuration-formats">Support of configuration formats<a class="headerlink" href="#support-of-configuration-formats" title="Permanent link">¶</a></h3>
@@ -327,7 +344,7 @@ Each run mode is associated with a set o
<span class="nt"></plugin></span>
</pre></div>
<div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. 1698080 by cziegeler on Thu, 27 Aug 2015 06:02:40 +0000
+ Rev. 1706489 by rombert on Fri, 2 Oct 2015 21:16:51 +0000
</div>
<div class="trademarkFooter">
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project