You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by gi...@apache.org on 2020/09/18 15:47:33 UTC

[sling-site] branch asf-site updated: Automatic website deployment from https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/27/

This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 11705ad  Automatic website deployment from https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/27/
11705ad is described below

commit 11705ad917884202dbaf438d9cfd7141e2a6cb9c
Author: jenkins <bu...@apache.org>
AuthorDate: Fri Sep 18 15:47:29 2020 +0000

    Automatic website deployment from https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/27/
---
 documentation/bundles/file-installer-provider.html      |  7 ++++---
 documentation/bundles/jcr-installer-provider.html       |  5 +++--
 .../sling-settings-org-apache-sling-settings.html       | 17 ++++++++++++++---
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/documentation/bundles/file-installer-provider.html b/documentation/bundles/file-installer-provider.html
index ed8082c..734a3f7 100644
--- a/documentation/bundles/file-installer-provider.html
+++ b/documentation/bundles/file-installer-provider.html
@@ -134,8 +134,9 @@
 <p>Configurations are handled by the <a href="/documentation/bundles/configuration-installer-factory.html">Configuration Installer Factory</a>. The different formats are described there.</p>
 <h2><a href="#custom-artifacts" id="custom-artifacts">Custom Artifacts</a></h2>
 <p>Custom artifacts are handled by the OSGi installer depending on the installed plugins. Have a look at the OSGi installer and its plugins for more information.</p>
-<h2><a href="#runmode-support" id="runmode-support">Runmode Support</a></h2>
-<p>The file installer supports run modes for installing artifacts (added with <a href="https://issues.apache.org/jira/browse/SLING-4478">SLING-4478</a>). Within the scanned directory, a folder prefixed with &quot;install.&quot; and followed by one or more run modes (separated by &quot;.&quot;) will only be considered if all the respective run modes are active. For example artifacts below a folder named <code>install.a1.dev</code> are only taken into account if the run modes <code>a1</cod [...]
+<h2><a href="#run-mode-support" id="run-mode-support">Run Mode Support</a></h2>
+<p>The file installer supports run modes for installing artifacts (added with <a href="https://issues.apache.org/jira/browse/SLING-4478">SLING-4478</a>). Within the scanned directory, a folder prefixed with <code>install.</code> and followed by one or more run modes (separated by <code>.</code>) will only be considered if all the respective run modes are active. For example artifacts below a folder named <code>install.a1.dev</code> are only taken into account if the run modes <code>a1</c [...]
+<p>Since version 1.3.0 of the File Installer bundle (<a href="https://issues.apache.org/jira/browse/SLING-9031">SLING-9031</a> and <a href="https://issues.apache.org/jira/browse/SLING-8548">SLING-8548</a>) advanced run mode support has been added, so that folder names in the form <code>install.[RUNMODESPEC]</code> are supported. <code>RUNMODESPEC</code> is defined in <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html#decisions-based-on-run-modes">Sling Settings [...]
 <p>You can even combine start level and run mode support. Just pay attention that the run mode foldername must be set on a direct child folder of <code>sling.fileinstall.dir</code> while the start level must be set directly on the parent folder of the artifact you want to install. E.g. <code>&lt;sling.fileinstall.dir&gt;/install.a1.dev/3/mybundle.jar</code> will only be considered if both run modes <code>a1</code> and <code>dev</code> are set. If this is the case then the according artif [...]
 <h1><a href="#project-info" id="project-info">Project Info</a></h1>
 <ul>
@@ -148,7 +149,7 @@
             </div><footer class="footer">
                 <div class="content has-text-centered is-small">
 <div class="revisionInfo">
-                        Last modified by <span class="author">Konrad Windszus</span> on <span class="comment">Fri Jul 13 11:08:10 2018 +0200</span>
+                        Last modified by <span class="author">Konrad Windszus</span> on <span class="comment">Fri Sep 18 17:26:30 2020 +0200</span>
                     </div>                    <p>
                         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
                     </p><p>
diff --git a/documentation/bundles/jcr-installer-provider.html b/documentation/bundles/jcr-installer-provider.html
index c1e04cb..be3f32c 100644
--- a/documentation/bundles/jcr-installer-provider.html
+++ b/documentation/bundles/jcr-installer-provider.html
@@ -122,7 +122,8 @@
 <p>The JCR installer provider does not check or scan the artifacts itself, the detection and installation is deferred to the OSGi installer.</p>
 <h2><a href="#run-mode-support" id="run-mode-support">Run Mode Support</a></h2>
 <p>The JCR installer supports <a href="sling-settings-org-apache-sling-settings.html">run modes</a> for installing artifacts. By default folders named <code>install</code> are checked for artifacts. If Apache Sling is started with one (or more run modes), all folders named <code>install.[RUNMODE]</code> are scanned as well. To be precise, the folder name can be followed by any number of run modes separated by dot (<code>.</code>). For example, if started with run modes <code>dev</code>,  [...]
-<p>Artifacts from folders with a run mode get a higher priority. For example by default, an <code>install</code> folder underneath <code>/libs</code> gets the priority <code>50</code>. For each run mode in the folder name, this priority is increased by <code>1</code>, so <code>install.dev</code> has <code>51</code> and <code>install.a1.dev</code> has <code>52</code>.</p>
+<p>Since version 3.3.0 of the JCR Installer bundle (<a href="https://issues.apache.org/jira/browse/SLING-9031">SLING-9031</a> and <a href="https://issues.apache.org/jira/browse/SLING-8548">SLING-8548</a>) advanced run mode support has been added, so that folder names in the form <code>install.[RUNMODESPEC]</code> are supported. <code>RUNMODESPEC</code> is defined in <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html#decisions-based-on-run-modes">Sling Settings< [...]
+<p>Artifacts from folders with a run mode get a higher priority. For example by default, an <code>install</code> folder underneath <code>/libs</code> gets the priority <code>50</code>. For each matching run mode in the folder name, this priority is increased by <code>1</code>, so <code>install.dev</code> has <code>51</code> and <code>install.a1.dev</code> has <code>52</code>.</p>
 <h2><a href="#start-level-support" id="start-level-support">Start Level Support</a></h2>
 <p>If the parent folder of a bundle has a name which is a number, this is used as the start level (when installing the bundle for the first time, compare with <a href="https://issues.apache.org/jira/browse/SLING-2011">SLING-2011</a>). So e.g. a bundle in the path <code>/libs/sling/install/15/somebundle.jar</code> is having the start level <code>15</code>.</p>
 <h2><a href="#write-back-support" id="write-back-support">Write Back Support</a></h2>
@@ -216,7 +217,7 @@ curl -X MKCOL  http://admin:admin@localhost:8080/apps/jcrtest/install
             </div><footer class="footer">
                 <div class="content has-text-centered is-small">
 <div class="revisionInfo">
-                        Last modified by <span class="author">Konrad Windszus</span> on <span class="comment">Thu Jun 4 17:45:40 2020 +0200</span>
+                        Last modified by <span class="author">Konrad Windszus</span> on <span class="comment">Fri Sep 18 17:26:30 2020 +0200</span>
                     </div>                    <p>
                         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
                     </p><p>
diff --git a/documentation/bundles/sling-settings-org-apache-sling-settings.html b/documentation/bundles/sling-settings-org-apache-sling-settings.html
index 21f3218..452ee0b 100644
--- a/documentation/bundles/sling-settings-org-apache-sling-settings.html
+++ b/documentation/bundles/sling-settings-org-apache-sling-settings.html
@@ -132,7 +132,7 @@
 </tbody>
 </table>
 <p>The new Sling Settings Bundle replaces the former <code>org.apache.sling.runmode</code> bundle and the <code>SlingSettingsService</code> previously provided by the Sling Engine bundle, as it also implements the run modes logic.</p>
-<h2><a href="#selecting-the-active-run-modes" id="selecting-the-active-run-modes">Selecting the active run modes</a></h2>
+<h1><a href="#selecting-the-active-run-modes" id="selecting-the-active-run-modes">Selecting the active run modes</a></h1>
 <p>The run modes are selected based on the <code>sling.run.modes</code> property (the &quot;selection property&quot;), specified in the Sling settings file or as a command-line parameter (which takes precedence), out of the valid run modes defined by the properties described below. The value is a String which contains a list of comma-separated run modes. If a run mode is given here which is not contained in any group of valid run modes (given in <code>sling.run.mode.install.options</code [...]
 <p>Using <code>-Dsling.run.modes=foo,bar</code> on the JVM command-line, for example, activates the <em>foo</em> and <em>bar</em> run modes if that combination is valid.</p>
 <p>The absolute truth about run modes definition and selection is found in the <a href="https://github.com/apache/sling-org-apache-sling-settings/blob/master/src/test/java/org/apache/sling/settings/impl/RunModeImplTest.java">RunModeImplTest</a> which should be self-explaining.</p>
@@ -174,7 +174,7 @@
 </tbody>
 </table>
 <p>Remember to look at the <code>RunModeImplTest</code> mentioned above for details, and feel free to enhance it with useful examples.</p>
-<h3><a href="#getting-the-run-modes-of-the-sling-instance" id="getting-the-run-modes-of-the-sling-instance">Getting the Run Modes of the Sling instance</a></h3>
+<h1><a href="#getting-the-run-modes-of-the-sling-instance" id="getting-the-run-modes-of-the-sling-instance">Getting the Run Modes of the Sling instance</a></h1>
 <p>The <code>SlingSettings</code> service provides the Run Modes of the running Sling instance as in this example:</p>
 <pre><code><!-- TODO syntax marker (::java) disabled -->SlingSettings settings = ...get from BundleContext...
 Set&lt;String&gt; currentRunModes = settings.getRunModes();
@@ -186,6 +186,17 @@ if(expectedRunModes.removeAll(currentRunModes)) {
 }
 </code></pre>
 <p>Getting run modes in this way is usually not needed, it's better to define bundles or configurations that are only valid in specific run modes, rather than making decisions in code based on run modes.</p>
+<h1><a href="#decisions-based-on-run-modes" id="decisions-based-on-run-modes">Decisions based on Run Modes</a></h1>
+<p>Since version 1.4.0 (<a href="https://issues.apache.org/jira/browse/SLING-9031">SLING-9031</a> and <a href="https://issues.apache.org/jira/browse/SLING-8548">SLING-8548</a>) of the Sling Settings bundle there is support for checking a run mode spec against the currently active run modes.</p>
+<p>The run mode spec grammar is as follows</p>
+<pre><code>run mode spec ::= disjunctions
+disjunctions ::= conjunctions { &quot;,&quot; conjunctions }
+conjunctions ::= conjunction { '.' conjunction }
+conjunction ::= notrunmode | runmode
+notrunmode ::= '-' runmode
+</code></pre>
+<p>It supports OR (<code>,</code>) and AND (<code>.</code>) combinations of run modes and negations with <code>-</code> .</p>
+<p>Programmatically this can be used via <code>SlingSettings.getBestRunModeMatchCountFromSpec(String runModeSpec)</code>.</p>
 </section></div></div>                            
                         </div>
                     </div>
@@ -193,7 +204,7 @@ if(expectedRunModes.removeAll(currentRunModes)) {
             </div><footer class="footer">
                 <div class="content has-text-centered is-small">
 <div class="revisionInfo">
-                        Last modified by <span class="author">Thomas Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
+                        Last modified by <span class="author">Konrad Windszus</span> on <span class="comment">Fri Sep 18 17:26:30 2020 +0200</span>
                     </div>                    <p>
                         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
                     </p><p>