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 2015/04/20 15:08:03 UTC

svn commit: r1674837 - in /sling/site/trunk/content/documentation: development.mdtext development/getting-and-building-sling.mdtext development/slingstart.mdtext

Author: cziegeler
Date: Mon Apr 20 13:08:02 2015
New Revision: 1674837

URL: http://svn.apache.org/r1674837
Log:
Update slingstart documentation

Modified:
    sling/site/trunk/content/documentation/development.mdtext
    sling/site/trunk/content/documentation/development/getting-and-building-sling.mdtext
    sling/site/trunk/content/documentation/development/slingstart.mdtext

Modified: sling/site/trunk/content/documentation/development.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development.mdtext?rev=1674837&r1=1674836&r2=1674837&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development.mdtext (original)
+++ sling/site/trunk/content/documentation/development.mdtext Mon Apr 20 13:08:02 2015
@@ -8,6 +8,7 @@ Welcome to the wonderful world of extend
 Look here for more information on developper support when your are using Sling to build your own applications.
 
 * [Getting and Building Sling]({{ refs.getting-and-building-sling.path }})
+* [Defining and Launching a Sling based Application]({{ refs.slingstart.path }})
 * [Embedding Sling]({{ refs.embedding-sling.path }})
 * [Logging]({{ refs.logging.path }})
 * [Client Request Logging]({{ refs.client-request-logging.path }})

Modified: sling/site/trunk/content/documentation/development/getting-and-building-sling.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/getting-and-building-sling.mdtext?rev=1674837&r1=1674836&r2=1674837&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/getting-and-building-sling.mdtext (original)
+++ sling/site/trunk/content/documentation/development/getting-and-building-sling.mdtext Mon Apr 20 13:08:02 2015
@@ -29,7 +29,7 @@ With this, Sling should be running at ht
 
 Before you begin, you need to have the following tools installed on your system:
 
-* Java 6 or higher; Java 6 recommended
+* Java 7 or higher
 * [Maven](http://maven.apache.org) 3.0.4 or later; enforced by the Sling parent pom
 
 If you want to set up Eclipse (not required to build Sling) you'll also need the following installed:
@@ -148,7 +148,7 @@ Note: On windows just leave out `/dev/nu
 1. Enter the `launchpad/builder` directory and launch Sling for the first time
 
     $ cd launchpad/builder
-    $ java -jar target/org.apache.sling.launchpad-*-standalone.jar -c test -f -
+    $ java -jar target/org.apache.sling.launchpad-*.jar -c test -f -
 
 
 <div class="note">

Modified: sling/site/trunk/content/documentation/development/slingstart.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/slingstart.mdtext?rev=1674837&r1=1674836&r2=1674837&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/slingstart.mdtext (original)
+++ sling/site/trunk/content/documentation/development/slingstart.mdtext Mon Apr 20 13:08:02 2015
@@ -1,8 +1,11 @@
 Title: The Apache Sling Provisioning Model and Apache SlingStart
 
-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 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).
+
+The model is describing an instance, it is not directly related to any particular tooling or packaging/provisioning vehicle.
+
+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.
 
-The model is used by various tooling, e.g. the slingstart-maven-plugin to build an executable application or web application.
 
 ## The Model
 
@@ -36,11 +39,12 @@ Each run mode has start levels. These st
 
 ### Artifacts
 
-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.
+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.
 
 ### Configurations
 
 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
 
  * :web.xml This configuration must be part of the :webapp runmode and contains a complete web.xml for the web application
@@ -52,7 +56,7 @@ Settings are key value pairs that are ad
 
 ### Features
 
-Features group run modes and defined a special functionality. The model also defines two special features:
+Features group run modes and define 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.
@@ -70,6 +74,7 @@ The model comes also with a textual desc
            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
@@ -92,3 +97,67 @@ A configuration for a run mode looks lik
            org.apache.sling.eventadmin
               useQueue=true
               ignoreTopics=["myTopic"]
+### Comments
+
+Each object in the model can be annotated with comments. A comment is a line starting with a '#'. Leading spaces are ignored.
+
+### Configurations in the Model file
+ 	 
+Configuration names are related to the PID and factory PID. The structure of the name is as follows:
+ 	 
+
+    name ::= <pid> ( '-' <subname> )
+
+ 	 
+If the form is just `<pid>`, the configuration contains the properties for a Managed Service. The `<pid>` is then the PID of the Managed Service. See the Configuration Admin service for details.
+ 	 
+When a Managed Service Factory is used, the situation is different. The `<pid>` part then describes the PID of the Managed Service Factory. You can pick any `<subname>` which is used as a unique alias. For example:
+ 	 
+    # Configuration for Managed Service com.acme.xyz
+    com.acme.xyz // 
+    # Managed Service Factory, creates an instance for com.acme.abc
+    com.acme.abc-default
+
+
+### Default Configuration Format
+
+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.
+
+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.
+
+The format is:
+
+    file ::= (comment) (header) *
+    comment ::= '#' <any>
+    header ::= prop '=' value
+    prop ::= symbolic-name // 1.4.2 of OSGi Core Specification
+    symbolic-name ::= token { '.' token } 
+    token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' }
+    value ::= [ type ] ( '[' values ']' | '(' values ')' | simple ) 
+    values ::= simple { ',' simple } 
+    simple ::= '"' stringsimple '"'
+    type ::= <1-char type code>
+    stringsimple ::= <quoted string representation of the value>
+
+The 1 character type code is one of:
+
+* 'T' : simple string
+* 'I' : Integer
+* 'L' : Long
+* 'F' : Float
+* 'D' : Double
+* 'X' : Byte
+* 'S' : Short
+* 'C' : Character
+* 'B' : Boolean
+
+
+###  Configurations Defined through Properties
+
+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:
+
+    com.acme.xyz [format=properties] 	 
+        ftp.port = 21
+        
+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.
+