You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2014/10/02 14:56:19 UTC
svn commit: r1628963 -
/sling/site/trunk/content/documentation/development/slingstart.mdtext
Author: cziegeler
Date: Thu Oct 2 12:56:19 2014
New Revision: 1628963
URL: http://svn.apache.org/r1628963
Log:
Update model description
Modified:
sling/site/trunk/content/documentation/development/slingstart.mdtext
Modified: sling/site/trunk/content/documentation/development/slingstart.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/slingstart.mdtext?rev=1628963&r1=1628962&r2=1628963&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/slingstart.mdtext (original)
+++ sling/site/trunk/content/documentation/development/slingstart.mdtext Thu Oct 2 12:56:19 2014
@@ -1,18 +1,19 @@
-Title: Apache SlingStart
+Title: The Apache Sling Provisioning Model and Apache SlingStart
-SlingStart defines a model to provision an OSGi based application. It can also be used to define a partial application aka feature or subsystem.#
+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.
-The model is used by tooling, e.g. the slingstart-maven-plugin to build an executable application or web application.
+The model is used by various tooling, e.g. the slingstart-maven-plugin to build an executable application or web application.
## The Model
The model is a simple API consisting of data objects:
- * Subsystem : this is the central object holding all the definitions. A subsystem consists of properties and run modes.
- * Subsystem properties: These properties can be used as variables for version definitions of artifacts.
- * Run Mode : A run mode contains artifacts, configurations, and settings. The artifacts are divided into start levels.
- * Start Level: A start level contains a set of artifacts (usually bundles)
- * Artifact: A deployable artifact
+ * Model: This is the central object. It consists of features.
+ * Feature : this is the central object describing a (partial) system. A feature consists of variables and run modes.
+ * Variables: These can be used to define artifact versions, settings values or configuration property values.
+ * Run Mode : A run mode contains artifacts, configurations, and settings. The artifacts are divided into artifact groups.
+ * Artifact Group: A group of artifacts with an associated start level (the artifacts are usually bundles)
+ * Artifact: A deployable artifact described by Maven coordinates.
* Configuration: A OSGi configuration
* Settings : Framework settings for the OSGi framework
@@ -22,10 +23,8 @@ The default run mode is always active, a
Custom run modes can be used to configure for different situations. Depending on which run mode is used to start the instance a different set of artifacts or configurations is used.
Each run mode is associated with a set of run mode names. Only if all listed run modes are active, the definition is used.
-The model also supports special run modes, which are have special meaning. By default, these pre defined special run modes are available:
+The model also supports special run modes, which have special meaning. By default, these pre defined special run modes are available:
- * :base This run mode 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.
- * :boot The artifacts that are installed before the framework is started. They're used to bootstrap the system.
* :standalone Artifacts for the standalone application - in contrast to a war.
* :webapp Artifacts for the webapp only
@@ -51,46 +50,45 @@ Special configurations can be marked wit
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.
-## XML Configuration
+### Features
+
+Features group run modes and defined a special functionality. The model also defines two special features:
+
+ * :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.
+ * :boot The artifacts that are installed before the framework is started. They're used to bootstrap the system.
-The XML format to define a subsystem is not as strict as the model itself, e.g. it allows to directly specify artifacts and configurations on the subsystem level. These are added to the default run mode.
-This makes the XML more compact as usually subsystems do not use specific start levels.
+## Model Files
-A subsystem can be configured through an XML file:
+The model comes also with a textual description language:
- <?xml version="1.0"?>
- <subsystem>
- <properties>
+ [feature name=my-feature]
+ [variables]
eventadmin.version=1.0.0
metatype.version=1.2.0
- </properties>
- <runMode/>
- <artifact groupId="org.apache.sling" artifactId="eventadmin" version="${eventadmin.version}"/>
- <artifact groupId="org.apache.sling" artifactId="metatype" version="${metatype.version}"/>
- <artifact groupId="org.apache.sling" artifactId="coordinator" version="3.0.0"/>
-
- <configuration pid="org.apache.sling.eventadmin">
- useQueue=true
- ignoreTopics=["myTopic"]
- </configuration>
- </subsystem>
+ [artifacts]
+ org.apache.sling/eventadmin/${eventadmin.version}
+ org.apache.sling/metatype/${metatype.version}
+ org.apache.sling/coordinator/3.0.0
+ [configurations]
+ org.apache.sling.eventadmin
+ useQueue=true
+ ignoreTopics=["myTopic"]
A configuration for a run mode looks like this:
- <subsystem>
- <runMode modes="mymode">
+ [feature name=my-feature]
+ [variables]
+ eventadmin.version=1.0.0
+ metatype.version=1.2.0
+
+ [artifacts runModes=mymode]
+ org.apache.sling/metatype/${metatype.version}
- <artifact groupId="org.apache.sling" artifactId="metatype" version="${metatype.version}"/>
- <artifact groupId="org.apache.sling" artifactId="coordinator" version="3.0.0"/>
+ [artifacts startLevel=5 runModes=mymode]
+ org.apache.sling/eventadmin/${eventadmin.version}
- <configuration pid="org.apache.sling.eventadmin">
- useQueue=true
- ignoreTopics=["myTopic"]
- </configuration>
-
- <startLevel level="5">
- <artifact groupId="org.apache.sling" artifactId="eventadmin" version="${eventadmin.version}"/>
- </startLevel>
- </runMode>
- </subsystem>
+ [configurations runModes=mymode]
+ org.apache.sling.eventadmin
+ useQueue=true
+ ignoreTopics=["myTopic"]