You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/21 07:22:15 UTC

[09/25] sling-site git commit: Testing with /ng/ context path for temporary https://sling.apache.org/ng/ setup

http://git-wip-us.apache.org/repos/asf/sling-site/blob/3a935d04/documentation/development/sling-mock.html
----------------------------------------------------------------------
diff --git a/documentation/development/sling-mock.html b/documentation/development/sling-mock.html
index 7b8c1f9..87afbf8 100644
--- a/documentation/development/sling-mock.html
+++ b/documentation/development/sling-mock.html
@@ -2,28 +2,32 @@
     <head>
 <meta charset="utf-8"/>
         <title>Apache Sling on JBake</title>
-        <link rel="stylesheet" href="/res/css/site.css"/>
-        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <link rel="stylesheet" href="/ng/res/css/site.css"/>
+        <link rel="icon" href="/ng/res/favicon.ico"/>
         <div class="title">
             <div class="logo">
                 <a href="http://sling.apache.org">
-                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                    <img border="0" alt="Apache Sling" src="/ng/res/logos/sling.svg"/>
                 </a>
             </div><div class="header">
                 <a href="http://www.apache.org">
-                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                    <img border="0" alt="Apache" src="/ng/res/logos/apache.png"/>
                 </a>
             </div>
         </div>        
     </head><body>
 <div class="menu">
-            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+            <strong><a href="/ng/documentation.html">Documentation</a></strong><br/><a href="/ng/documentation/getting-started.html">Getting Started</a><br/><a href="/ng/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/ng/documentation/development.html">Development</a><br/><a href="/ng/documentation/bundles.html">Bundles</a><br/><a href="/ng/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/ng/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/ng/apidocs/sling9/index.html">Sling 9</a><br/><a href="/ng/apidocs/sling8/index.html">Sling 8</a><br/><a href="/ng/apidocs/sling7/index.html">Sling 7</a><br/><a href="/ng/apidocs/sling6/index.html">Sling 6</a><br/><a href="/ng/apidocs/sling5/index.html">Sling 5</a><br/><a href="/ng/javadoc-io.html">Archive at javadoc.io</a><br/><p></p
 ><strong>Project info</strong><br/><a href="/ng/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/ng/contributing.html">Contributing</a><br/><a href="/ng/news.html">News</a><br/><a href="/ng/links.html">Links</a><br/><a href="/ng/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/ng/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.
 org/">Donate!</a><br/><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/ng/sitemap.html">Site Map</a></strong>
         </div>        <div class="main">
 <div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Mocks</h1></header><p>Mock implementation of selected Sling APIs for easier testing.</p>
 <p>[TOC]</p>
 <h2>Maven Dependency</h2>
-<h1>!xml</h1>
-<p><dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock</artifactId> </dependency></p>
+<pre><code>#!xml
+&lt;dependency&gt;
+  &lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
+  &lt;artifactId&gt;org.apache.sling.testing.sling-mock&lt;/artifactId&gt;
+&lt;/dependency&gt;
+</code></pre>
 <p>See latest version on the <a href="/downloads.cgi">downloads page</a>.</p>
 <p>There are two major version ranges available:</p>
 <ul>
@@ -33,41 +37,65 @@
 <h2>Implemented mock features</h2>
 <p>The mock implementation supports:</p>
 <ul>
-  <li><code>ResourceResolver</code> implementation for reading and writing resource data using the Sling Resource API</li>
-  <li>Backed by a <a href="/documentation/development/jcr-mock.html">mocked</a> or real Jackrabbit JCR implementation</li>
-  <li>Uses the productive <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource">Sling JCR resource provider implementation</a> internally to do the Resource-JCR mapping</li>
-  <li>Alternatively the non-JCR mock implementation provided by the <a href="/documentation/development/resourceresolver-mock.html">Sling resourceresolver-mock implementation</a> can be used</li>
-  <li><code>AdapterManager</code> implementation for registering adapter factories and resolving adaptions</li>
-  <li>The implementation is thread-safe so it can be used in parallel running unit tests</li>
-  <li><code>SlingScriptHelper</code> implementation providing access to mocked request/response objects and supports getting OSGi services from the <a href="/documentation/development/osgi-mock.html">mocked OSGi</a> environment.</li>
-  <li>Implementations of the servlet-related Sling API classes like <code>SlingHttpServletRequest</code> and <code>SlingHttpServletRequest</code></li>
-  <li>It is possible to set request data to simulate a certain Sling HTTP request</li>
+  <li><code>ResourceResolver</code> implementation for reading and writing resource data using the Sling Resource API
+    <ul>
+      <li>Backed by a <a href="/documentation/development/jcr-mock.html">mocked</a> or real Jackrabbit JCR implementation</li>
+      <li>Uses the productive <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource">Sling JCR resource provider implementation</a> internally to do the Resource-JCR mapping</li>
+      <li>Alternatively the non-JCR mock implementation provided by the  <a href="/documentation/development/resourceresolver-mock.html">Sling resourceresolver-mock implementation</a> can be used</li>
+    </ul>
+  </li>
+  <li><code>AdapterManager</code> implementation for registering adapter factories and resolving adaptions
+    <ul>
+      <li>The implementation is thread-safe so it can be used in parallel running unit tests</li>
+    </ul>
+  </li>
+  <li><code>SlingScriptHelper</code> implementation providing access to mocked request/response objects and supports getting  OSGi services from the <a href="/documentation/development/osgi-mock.html">mocked OSGi</a> environment.</li>
+  <li>Implementations of the servlet-related Sling API classes like <code>SlingHttpServletRequest</code> and <code>SlingHttpServletRequest</code>
+    <ul>
+      <li>It is possible to set request data to simulate a certain Sling HTTP request</li>
+    </ul>
+  </li>
   <li>Support for Sling Models (Sling Models API 1.1 and Impl 1.1 or higher required)</li>
   <li>Additional services <code>MimeTypeService</code></li>
   <li>Context Plugins</li>
 </ul>
 <p>The following features are <em>not supported</em>:</p>
 <ul>
-  <li>It is not possible (nor intended) to really execute sling components/scripts and render their results.</li>
-  <li>The goal is to test supporting classes in Sling context, not the sling components/scripts themselves</li>
+  <li>It is not possible (nor intended) to really execute sling components/scripts and render their results.
+    <ul>
+      <li>The goal is to test supporting classes in Sling context, not the sling components/scripts themselves</li>
+    </ul>
+  </li>
 </ul>
 <h3>Additional features</h3>
 <p>Additional features provided:</p>
 <ul>
   <li><code>SlingContext</code> JUnit Rule for easily setting up a Sling Mock environment in your JUnit test cases</li>
-  <li><code>ContentLoader</code> supports importing JSON data and binary data into the mock resource hierarchy to easily prepare a test fixture consisting of a hierarchy of resources and properties.</li>
-  <li>The same JSON format can be used that is provided by the Sling GET servlet for output</li>
+  <li><code>ContentLoader</code> supports importing JSON data and binary data into the mock resource hierarchy to easily  prepare a test fixture consisting of a hierarchy of resources and properties.
+    <ul>
+      <li>The same JSON format can be used that is provided by the Sling GET servlet for output</li>
+    </ul>
+  </li>
   <li><code>ContentBuilder</code> and <code>ResourceBuilder</code> make it easier to create resources and properties as test fixture</li>
 </ul>
 <h2>Usage</h2>
 <h3>Sling Context JUnit Rule</h3>
 <p>The Sling mock context can be injected into a JUnit test using a custom JUnit rule named <code>SlingContext</code>. This rules takes care of all initialization and cleanup tasks required to make sure all unit tests can run independently (and in parallel, if required).</p>
 <p>Example:</p>
-<h1>!java</h1>
-<p>public class ExampleTest {</p>
-<p>@Rule public final SlingContext context = new SlingContext();</p>
-<p>@Test public void testSomething() { Resource resource = context.resourceResolver().getResource("/content/sample/en"); // further testing }</p>
-<p>}</p>
+<pre><code>#!java
+public class ExampleTest {
+
+  @Rule
+  public final SlingContext context = new SlingContext();
+
+  @Test
+  public void testSomething() {
+    Resource resource = context.resourceResolver().getResource(&quot;/content/sample/en&quot;);
+    // further testing
+  }
+
+}
+</code></pre>
 <p>It is possible to combine such a unit test rule with a <code>@RunWith</code> annotation e.g. for <a href="http://mockito.github.io/mockito/docs/current/org/mockito/runners/MockitoJUnitRunner.html">Mockito JUnit Runner</a>.</p>
 <p>The <code>SlingContext</code> object provides access to mock implementations of:</p>
 <ul>
@@ -86,10 +114,14 @@
 </ul>
 <h3>Choosing Resource Resolver Mock Type</h3>
 <p>The Sling mock context supports different resource resolver types. Example:</p>
-<h1>!java</h1>
-<p>public class ExampleTest {</p>
-<p>@Rule public final SlingContext context = new SlingContext(ResourceResolverType.RESOURCERESOLVER_MOCK);</p>
-<p>}</p>
+<pre><code>#!java
+public class ExampleTest {
+
+  @Rule
+  public final SlingContext context = new SlingContext(ResourceResolverType.RESOURCERESOLVER_MOCK);
+
+}
+</code></pre>
 <p>Different resource resolver mock types are supported with pros and cons, see next chapter for details.</p>
 <h3>Resource Resolver Types</h3>
 <p>The Sling Mocks resource resolver implementation supports different "types" of adapters for the mocks. Depending on the type an underlying JCR repository is used or not, and the data is stored in-memory or in a real repository.</p>
@@ -124,8 +156,13 @@
   <li>Lucene indexing is not included, thus fulltext search queries will return no result</li>
 </ul>
 <p>To use this type you have to declare an additional dependency in your test project:</p>
-<h1>!xml</h1>
-<p><dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock-oak</artifactId> <scope>test</scope> </dependency></p>
+<pre><code>#!xml
+&lt;dependency&gt;
+  &lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
+  &lt;artifactId&gt;org.apache.sling.testing.sling-mock-oak&lt;/artifactId&gt;
+  &lt;scope&gt;test&lt;/scope&gt;
+&lt;/dependency&gt;
+</code></pre>
 <p>See latest version on the <a href="/downloads.cgi">downloads page</a>.</p>
 <p><strong>JCR_JACKRABBIT</strong></p>
 <ul>
@@ -136,73 +173,158 @@
   <li>Node types defined in OSGi bundle header 'Sling-Nodetypes' found in MANIFEST.MF files in the classpath are registered automatically.</li>
 </ul>
 <p>To use this type you have to declare an additional dependency in your test project:</p>
-<h1>!xml</h1>
-<p><dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId> <scope>test</scope> </dependency></p>
+<pre><code>#!xml
+&lt;dependency&gt;
+  &lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
+  &lt;artifactId&gt;org.apache.sling.testing.sling-mock-jackrabbit&lt;/artifactId&gt;
+  &lt;scope&gt;test&lt;/scope&gt;
+&lt;/dependency&gt;
+</code></pre>
 <p>See latest version on the <a href="/downloads.cgi">downloads page</a>.</p>
 <p><em>Remarks on the JCR_JACKRABBIT type:</em></p>
 <ul>
   <li>The repository is not cleared for each unit test, so make sure to use a unique node path for each unit test. You may use the <code>uniquePath()</code> helper object of the SlingContext rule for this.</li>
-  <li>The <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/commons/testing">sling/commons/testing</a> dependency introduces a lot of further dependencies from jackrabbit and others, be careful that they do not conflict and are imported in the right order in your test project</li>
+  <li>The <a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/commons/testing">sling/commons/testing</a> dependency introduces a lot of further dependencies from  jackrabbit and others, be careful that they do not conflict and are imported in the right order in your test project</li>
 </ul>
 <h3>Sling Resource Resolver</h3>
 <p>Example:</p>
-<h1>!java</h1>
-<p>// get a resource resolver ResourceResolver resolver = MockSling.newResourceResolver();</p>
-<p>// get a resource resolver backed by a specific repository type ResourceResolver resolver = MockSling.newResourceResolver(ResourceResolverType.JCR_MOCK);</p>
+<pre><code>#!java
+// get a resource resolver
+ResourceResolver resolver = MockSling.newResourceResolver();
+
+// get a resource resolver backed by a specific repository type
+ResourceResolver resolver = MockSling.newResourceResolver(ResourceResolverType.JCR_MOCK);
+</code></pre>
 <p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.resourceResolver()</code>.</p>
 <h3>Adapter Factories</h3>
 <p>You can register your own or existing adapter factories to support adaptions e.g. for classes extending <code>SlingAdaptable</code>.</p>
 <p>Example:</p>
-<h1>!java</h1>
-<p>// register adapter factory BundleContext bundleContext = MockOsgi.newBundleContext(); MockSling.setAdapterManagerBundleContext(bundleContext); bundleContext.registerService(myAdapterFactory);</p>
-<p>// test adaption MyClass object = resource.adaptTo(MyClass.class);</p>
-<p>// cleanup after unit test MockSling.clearAdapterManagerBundleContext();</p>
+<pre><code>#!java
+// register adapter factory
+BundleContext bundleContext = MockOsgi.newBundleContext();
+MockSling.setAdapterManagerBundleContext(bundleContext);
+bundleContext.registerService(myAdapterFactory);
+
+// test adaption
+MyClass object = resource.adaptTo(MyClass.class);
+
+// cleanup after unit test
+MockSling.clearAdapterManagerBundleContext();
+</code></pre>
 <p>Make sure you clean up the adapter manager bundle association after running the unit test otherwise it can interfere with the following tests. If you use the <code>SlingContext</code> JUnit rule this is done automatically for you.</p>
 <p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.registerService()</code>.</p>
 <h3>SlingScriptHelper</h3>
 <p>Example:</p>
-<h1>!java</h1>
-<p>// get script helper SlingScriptHelper scriptHelper = MockSling.newSlingScriptHelper();</p>
-<p>// get request SlingHttpServletRequest request = scriptHelper.getRequest();</p>
-<p>// get service MyService object = scriptHelper.getService(MyService.class);</p>
-<p>To support getting OSGi services you have to register them via the <code>BundleContext</code> interface of the <a href="/documentation/development/jcr-mock.html">JCR Mocks</a> before. You can use an alternative factory method for the <code>SlingScriptHelper</code> providing existing instances of request, response and bundle context.</p>
+<pre><code>#!java
+// get script helper
+SlingScriptHelper scriptHelper = MockSling.newSlingScriptHelper();
+
+// get request
+SlingHttpServletRequest request = scriptHelper.getRequest();
+
+// get service
+MyService object = scriptHelper.getService(MyService.class);
+</code></pre>
+<p>To support getting OSGi services you have to register them via the <code>BundleContext</code> interface of the <a href="/documentation/development/jcr-mock.html">JCR Mocks</a> before. You can use an alternative factory method for the <code>SlingScriptHelper</code> providing existing instances of request, response and bundle context. </p>
 <p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.slingScriptHelper()</code>.</p>
 <h3>SlingHttpServletRequest</h3>
 <p>Example for preparing a sling request with custom request data:</p>
-<h1>!java</h1>
-<p>// prepare sling request ResourceResolver resourceResolver = MockSling.newResourceResolver(); MockSlingHttpServletRequest request = new MockSlingHttpServletRequest(resourceResolver);</p>
-<p>// simulate query string request.setQueryString("param1=aaa&amp;param2=bbb");</p>
-<p>// alternative - set query parameters as map request.setParameterMap(ImmutableMap.&lt;String,Object&gt;builder() .put("param1", "aaa") .put("param2", "bbb") .build());</p>
-<p>// set current resource request.setResource(resourceResolver.getResource("/content/sample"));</p>
-<p>// set sling request path info properties MockRequestPathInfo requestPathInfo = (MockRequestPathInfo)request.getRequestPathInfo(); requestPathInfo.setSelectorString("selector1.selector2"); requestPathInfo.setExtension("html");</p>
-<p>// set method request.setMethod(HttpConstants.METHOD_POST);</p>
-<p>// set attributes request.setAttribute("attr1", "value1");</p>
-<p>// set headers request.addHeader("header1", "value1");</p>
-<p>// set cookies request.addCookie(new Cookie("cookie1", "value1"));</p>
+<pre><code>#!java
+// prepare sling request
+ResourceResolver resourceResolver = MockSling.newResourceResolver();
+MockSlingHttpServletRequest request = new MockSlingHttpServletRequest(resourceResolver);
+
+// simulate query string
+request.setQueryString(&quot;param1=aaa&amp;param2=bbb&quot;);
+
+// alternative - set query parameters as map
+request.setParameterMap(ImmutableMap.&lt;String,Object&gt;builder()
+    .put(&quot;param1&quot;, &quot;aaa&quot;)
+    .put(&quot;param2&quot;, &quot;bbb&quot;)
+    .build());
+
+// set current resource
+request.setResource(resourceResolver.getResource(&quot;/content/sample&quot;));
+
+// set sling request path info properties
+MockRequestPathInfo requestPathInfo = (MockRequestPathInfo)request.getRequestPathInfo();
+requestPathInfo.setSelectorString(&quot;selector1.selector2&quot;);
+requestPathInfo.setExtension(&quot;html&quot;);
+
+// set method
+request.setMethod(HttpConstants.METHOD_POST);
+
+// set attributes
+request.setAttribute(&quot;attr1&quot;, &quot;value1&quot;);
+
+// set headers
+request.addHeader(&quot;header1&quot;, &quot;value1&quot;);
+
+// set cookies
+request.addCookie(new Cookie(&quot;cookie1&quot;, &quot;value1&quot;));
+</code></pre>
 <h3>SlingHttpServletResponse</h3>
 <p>Example for preparing a sling response which can collect the data that was written to it:</p>
-<h1>!java</h1>
-<p>// prepare sling response MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();</p>
-<p>// execute your unit test code that writes to the response...</p>
-<p>// validate status code assertEquals(HttpServletResponse.SC_OK, response.getStatus());</p>
-<p>// validate content type and content length assertEquals("text/plain;charset=UTF-8", response.getContentType()); assertEquals(CharEncoding.UTF_8, response.getCharacterEncoding()); assertEquals(55, response.getContentLength());</p>
-<p>// validate headers assertTrue(response.containsHeader("header1")); assertEquals("5", response.getHeader("header2"));</p>
-<p>// validate response body as string assertEquals(TEST_CONTENT, response.getOutputAsString());</p>
-<p>// validate response body as binary data assertArrayEquals(TEST_DATA, response.getOutput());</p>
+<pre><code>#!java
+// prepare sling response
+MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();
+
+// execute your unit test code that writes to the response...
+
+// validate status code
+assertEquals(HttpServletResponse.SC_OK, response.getStatus());
+
+// validate content type and content length
+assertEquals(&quot;text/plain;charset=UTF-8&quot;, response.getContentType());
+assertEquals(CharEncoding.UTF_8, response.getCharacterEncoding());
+assertEquals(55, response.getContentLength());
+
+// validate headers
+assertTrue(response.containsHeader(&quot;header1&quot;));
+assertEquals(&quot;5&quot;, response.getHeader(&quot;header2&quot;));
+
+// validate response body as string
+assertEquals(TEST_CONTENT, response.getOutputAsString());
+
+// validate response body as binary data
+assertArrayEquals(TEST_DATA, response.getOutput());
+</code></pre>
 <h3>Import resource data from JSON file in classpath</h3>
 <p>With the <code>ContentLoader</code> it is possible to import structured resource and property data from a JSON file stored in the classpath beneath the unit tests. This data can be used as text fixture for unit tests.</p>
 <p>Example JSON data:</p>
-<h1>!json</h1>
-<p>{ "jcr:primaryType": "app:Page", "jcr:content": { "jcr:primaryType": "app:PageContent", "jcr:title": "English", "app:template": "/apps/sample/templates/homepage", "sling:resourceType": "sample/components/homepage", "jcr:createdBy": "admin", "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200", "par": { "jcr:primaryType": "nt:unstructured", "sling:resourceType": "foundation/components/parsys", "colctrl": { "jcr:primaryType": "nt:unstructured", "layout": "2;colctrl-lt0", "sling:resourceType": "foundation/components/parsys/colctrl" } } } }</p>
+<pre><code>#!json
+{
+  &quot;jcr:primaryType&quot;: &quot;app:Page&quot;,
+  &quot;jcr:content&quot;: {
+    &quot;jcr:primaryType&quot;: &quot;app:PageContent&quot;,
+    &quot;jcr:title&quot;: &quot;English&quot;,
+    &quot;app:template&quot;: &quot;/apps/sample/templates/homepage&quot;,
+    &quot;sling:resourceType&quot;: &quot;sample/components/homepage&quot;,
+    &quot;jcr:createdBy&quot;: &quot;admin&quot;,
+    &quot;jcr:created&quot;: &quot;Thu Aug 07 2014 16:32:59 GMT+0200&quot;,
+    &quot;par&quot;: {
+      &quot;jcr:primaryType&quot;: &quot;nt:unstructured&quot;,
+      &quot;sling:resourceType&quot;: &quot;foundation/components/parsys&quot;,
+      &quot;colctrl&quot;: {
+        &quot;jcr:primaryType&quot;: &quot;nt:unstructured&quot;,
+        &quot;layout&quot;: &quot;2;colctrl-lt0&quot;,
+        &quot;sling:resourceType&quot;: &quot;foundation/components/parsys/colctrl&quot;
+      }
+    }
+  }
+}
+</code></pre>
 <p>Example code to import the JSON data:</p>
-<h1>!java</h1>
-<p>context.load().json("/sample-data.json", "/content/sample/en");</p>
+<pre><code>#!java
+context.load().json(&quot;/sample-data.json&quot;, &quot;/content/sample/en&quot;);
+</code></pre>
 <p>This codes creates a new resource at <code>/content/sample/en</code> (and - if not existent - the parent resources) and imports the JSON data to this node. It can be accessed using the Sling Resource or JCR API afterwards.</p>
 <h3>Import binary data from file in classpath</h3>
-<p>With the <code>ContentLoader</code> it is possible to import a binary file stored in the classpath beneath the unit tests. The data is stored using a nt:file/nt:resource or nt:resource node type.</p>
+<p>With the <code>ContentLoader</code> it is possible to import a binary file stored in the classpath beneath the unit tests. The data is stored using a nt:file/nt:resource or nt:resource node type. </p>
 <p>Example code to import a binary file:</p>
-<h1>!java</h1>
-<p>context.load().binaryFile("/sample-file.gif", "/content/binary/sample-file.gif");</p>
+<pre><code>#!java
+context.load().binaryFile(&quot;/sample-file.gif&quot;, &quot;/content/binary/sample-file.gif&quot;);
+</code></pre>
 <p>This codes creates a new resource at <code>/content/binary/sample-file.gif</code> (and - if not existent - the parent resources) and imports the binary data to a jcr:content subnode.</p>
 <h3>Building content</h3>
 <p>Sling Mocks provides two alterantives for quickly building test content in the repository with as few code as possible. Sling Mocks provides two alternatives. Both are quite similar in their results, but follow different API concepts. You can choose whatever matches your needs and mix them as well.</p>
@@ -213,25 +335,39 @@
 <h4>Building content using <code>ContentBuilder</code></h4>
 <p>The entry point for the <code>ContentBuilder</code> is the <code>create()</code> method on the Sling context.</p>
 <p>Example:</p>
-<h1>!java</h1>
-<p>context.create().resource("/content/test1", ImmutableMap.&lt;String, Object&gt;builder() .put("prop1", "value1") .put("prop2", "value2") .build());</p>
+<pre><code>#!java
+context.create().resource(&quot;/content/test1&quot;, ImmutableMap.&lt;String, Object&gt;builder()
+        .put(&quot;prop1&quot;, &quot;value1&quot;)
+        .put(&quot;prop2&quot;, &quot;value2&quot;)
+        .build());
+</code></pre>
 <p>Simplified syntax without using a map:</p>
-<h1>!java</h1>
-<p>context.create().resource("/content/test1", "prop1", "value1", "prop2", "value2");</p>
+<pre><code>#!java
+context.create().resource(&quot;/content/test1&quot;,
+        &quot;prop1&quot;, &quot;value1&quot;,
+        &quot;prop2&quot;, &quot;value2&quot;);
+</code></pre>
 <p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.create()</code>.</p>
 <h4>Building content using <code>ResourceBuilder</code></h4>
 <p>The entry point for the <code>ResourceBuilder</code> is the <code>build()</code> method on the Sling context.</p>
 <p>Example:</p>
-<h1>!java</h1>
-<p>context.build().resource("/content/test1") .siblingsMode() .resource("test1.1", "stringParam", "configValue1.1") .resource("test1.2", "stringParam", "configValue1.2") .resource("test1.2", "stringParam", "configValue1.3");</p>
+<pre><code>#!java
+context.build().resource(&quot;/content/test1&quot;)
+        .siblingsMode()
+        .resource(&quot;test1.1&quot;, &quot;stringParam&quot;, &quot;configValue1.1&quot;)
+        .resource(&quot;test1.2&quot;, &quot;stringParam&quot;, &quot;configValue1.2&quot;)
+        .resource(&quot;test1.2&quot;, &quot;stringParam&quot;, &quot;configValue1.3&quot;);
+</code></pre>
 <p>See JavaDocs of the class <code>org.apache.sling.resourcebuilder.api.ResourceBuilder</code> for a detailed documentation.</p>
 <h3>Context Plugins</h3>
 <p>Sling Mocks supports "Context Plugins" that hook into the lifecycle of each test run and can prepare test setup before or after the other setUp actions, and execute test tear down code before or after the other tearDown action.</p>
 <p>To define a plugin implement the <code>org.apache.sling.testing.mock.osgi.context.ContextPlugin&lt;SlingContextImpl&gt;</code> interface. For convenience it is recommended to extend the abstract class <code>org.apache.sling.testing.mock.osgi.context.AbstractContextPlugin&lt;SlingContextImpl&gt;</code>. These plugins can be used with Sling Mock context, but also with context instances deriving from it like AEM Mocks. In most cases you would just override the <code>afterSetUp</code> method. In this method you can register additional OSGi services or do other preparation work. It is recommended to define a constant pointing to a singleton of a plugin instance for using it.</p>
 <p>To use a plugin in your unit test class, use the <code>SlingContextBuilder</code> class instead of directly instantiating the <code>SlingContext</code>class. This allows you in a fluent style to configure more options, with the <code>plugin(...)</code> method you can add one or more plugins.</p>
-<p>Example:</p>
-<h1>!java</h1>
-<p>@Rule public SlingContext context = new SlingContextBuilder().plugin(MY_PLUGIN).build();</p>
+<p>Example: </p>
+<pre><code>#!java
+@Rule
+public SlingContext context = new SlingContextBuilder().plugin(MY_PLUGIN).build();
+</code></pre>
 <p>More examples:</p>
 <ul>
   <li><a href="https://github.com/apache/sling/blob/trunk/contrib/extensions/contextaware-config/testing/mocks/caconfig-mock-plugin/src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java">Apache Sling Context-Aware Configuration Mock Plugin</a></li>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/3a935d04/documentation/development/sling-testing-tools.html
----------------------------------------------------------------------
diff --git a/documentation/development/sling-testing-tools.html b/documentation/development/sling-testing-tools.html
index 72b9518..e546c95 100644
--- a/documentation/development/sling-testing-tools.html
+++ b/documentation/development/sling-testing-tools.html
@@ -2,28 +2,28 @@
     <head>
 <meta charset="utf-8"/>
         <title>Apache Sling on JBake</title>
-        <link rel="stylesheet" href="/res/css/site.css"/>
-        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <link rel="stylesheet" href="/ng/res/css/site.css"/>
+        <link rel="icon" href="/ng/res/favicon.ico"/>
         <div class="title">
             <div class="logo">
                 <a href="http://sling.apache.org">
-                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                    <img border="0" alt="Apache Sling" src="/ng/res/logos/sling.svg"/>
                 </a>
             </div><div class="header">
                 <a href="http://www.apache.org">
-                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                    <img border="0" alt="Apache" src="/ng/res/logos/apache.png"/>
                 </a>
             </div>
         </div>        
     </head><body>
 <div class="menu">
-            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+            <strong><a href="/ng/documentation.html">Documentation</a></strong><br/><a href="/ng/documentation/getting-started.html">Getting Started</a><br/><a href="/ng/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/ng/documentation/development.html">Development</a><br/><a href="/ng/documentation/bundles.html">Bundles</a><br/><a href="/ng/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/ng/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/ng/apidocs/sling9/index.html">Sling 9</a><br/><a href="/ng/apidocs/sling8/index.html">Sling 8</a><br/><a href="/ng/apidocs/sling7/index.html">Sling 7</a><br/><a href="/ng/apidocs/sling6/index.html">Sling 6</a><br/><a href="/ng/apidocs/sling5/index.html">Sling 5</a><br/><a href="/ng/javadoc-io.html">Archive at javadoc.io</a><br/><p></p
 ><strong>Project info</strong><br/><a href="/ng/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/ng/contributing.html">Contributing</a><br/><a href="/ng/news.html">News</a><br/><a href="/ng/links.html">Links</a><br/><a href="/ng/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/ng/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.
 org/">Donate!</a><br/><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/ng/sitemap.html">Site Map</a></strong>
         </div>        <div class="main">
 <div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Testing Tools</h1></header><div class="warning">
 While this information is still valid, we recommend using the tools and techniques described
-in the newer "Junit Server-Side Tests Support" page instead, see link below.
+in the newer "Junit Server-Side Tests Support" page instead, see link below. 
 </div>
-<p>As mentioned above, this is now replaced by the <a href="/documentation/bundles/org-apache-sling-junit-bundles.html">Junit Server-Side Tests Support</a> page.</p>
+<p>As mentioned above, this is now replaced by the <a href="/documentation/bundles/org-apache-sling-junit-bundles.html">Junit Server-Side Tests Support</a> page. </p>
 <p>Sling provides a number of testing tools to support the following use cases:</p>
 <ul>
   <li>Run JUnit tests contributed by OSGi bundles in an OSGi system. This does not require Sling and should work in other OSGi environments.</li>
@@ -44,7 +44,7 @@ Note that the JUnitServlet does not require authentication, so it would allow an
 <div class="note">
 For tighter integration with Sling, the alternate `SlingJUnitServlet` is registered with the `sling/junit/testing` resource type and `.junit` selector, if the bundle is running in a Sling system. Using this servlet instead of the plain JUnitServlet also allows Sling authentication to be used for running the tests, and the standard Sling request processing is used, including servlet filters for example.
 </div>
-<p>To try the JUnitServlet interactively, install a bundle that contains tests registered via the <code>Sling-Test-Regexp=.*Test</code> bundle header.</p>
+<p>To try the JUnitServlet interactively, install a bundle that contains tests registered via the <code>Sling-Test-Regexp=.*Test</code> bundle header. </p>
 <p>The JUnit core services use this regular expression to select which classes of the test bundle should be executed as JUnit tests.</p>
 <p>To list the available tests, open http://localhost:8080/system/sling/junit/ . The servlet shows available tests, and allows you to execute them via a POST request.</p>
 <p>Adding a path allows you to select a specific subset of tests, as in http://localhost:8080/system/sling/junit/org.apache.sling.junit.remote.html - the example integration tests described below use this to selectively execute server-side tests. The JUnitServlet provides various output formats, including in particular JSON, see http://localhost:8080/system/sling/junit/.json for example.</p>
@@ -53,9 +53,22 @@ For tighter integration with Sling, the alternate `SlingJUnitServlet` is registe
 <p>The <code>@TestReference</code> annotation is used to inject OSGi services in tests that are executed server side.The <code>BundleContext</code> can also be injected in this way.</p>
 <h2>Curl examples</h2>
 <p>Here's an example executing a few tests using curl:</p>
-<p>$ curl -X POST http://localhost:8080/system/sling/junit/org.apache.sling.testing.samples.sampletests.JUnit.json [{ "INFO_TYPE": "test", "description": "testPasses(org.apache.sling.testing.samples.sampletests.JUnit3Test)" },{ "INFO_TYPE": "test", "description": "testPasses(org.apache.sling.testing.samples.sampletests.JUnit4Test)" },{ "INFO_TYPE": "test", "description": "testRequiresBefore(org.apache.sling.testing.samples.sampletests.JUnit4Test)" } ]</p>
+<pre><code>$ curl -X POST http://localhost:8080/system/sling/junit/org.apache.sling.testing.samples.sampletests.JUnit.json
+[{
+    &quot;INFO_TYPE&quot;: &quot;test&quot;,
+    &quot;description&quot;: &quot;testPasses(org.apache.sling.testing.samples.sampletests.JUnit3Test)&quot;
+  },{
+    &quot;INFO_TYPE&quot;: &quot;test&quot;,
+    &quot;description&quot;: &quot;testPasses(org.apache.sling.testing.samples.sampletests.JUnit4Test)&quot;
+  },{
+    &quot;INFO_TYPE&quot;: &quot;test&quot;,
+    &quot;description&quot;: &quot;testRequiresBefore(org.apache.sling.testing.samples.sampletests.JUnit4Test)&quot;
+  }
+]
+</code></pre>
 <p>And another example with a test that fails:</p>
-<p>$ curl -X POST http://localhost:8080/system/sling/junit/org.apache.sling.testing.samples.failingtests.JUnit4FailingTest.json</p>
+<pre><code>$ curl -X POST http://localhost:8080/system/sling/junit/org.apache.sling.testing.samples.failingtests.JUnit4FailingTest.json
+</code></pre>
 <h1>Scriptable server-side tests</h1>
 <p>If the <a href="http://svn.apache.org/repos/asf/sling/trunk/testing/junit/scriptable">org.apache.sling.junit.scriptable</a> bundle is active in a Sling system, (in addition to the <code>org.apache.sling.junit.core</code> bundle), scriptable tests can be executed by the <code>JUnitServlet</code> according to the following rules:</p>
 <ul>
@@ -65,12 +78,26 @@ For tighter integration with Sling, the alternate `SlingJUnitServlet` is registe
 </ul>
 <p>The <a href="http://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/integrationtests/serverside/scriptable/ScriptableTestsTest.java">ScriptableTestsTest</a> class, from the integration test samples module described below, sets up such a test node and its accompanying script, and calls the JUnitServlet to execute the test. It can be used as a detailed example of how this works.</p>
 <p>Here's a minimal example that sets up and executes a scriptable test:</p>
-<p>$ curl -u admin:admin -Fjcr:primaryNodeType=sling:Folder -Fsling:resourceType=foo -Fjcr:mixinTypes=sling:Test http://localhost:8080/apps/foo ... $ echo TEST_PASSED &gt; /tmp/test.txt.esp ; curl -u admin:admin -T/tmp/test.txt.esp http://localhost:8080/apps/foo/test.txt.esp</p>
+<pre><code>$ curl -u admin:admin -Fjcr:primaryNodeType=sling:Folder -Fsling:resourceType=foo -Fjcr:mixinTypes=sling:Test http://localhost:8080/apps/foo
+...
+$ echo TEST_PASSED &gt; /tmp/test.txt.esp ; curl -u admin:admin -T/tmp/test.txt.esp http://localhost:8080/apps/foo/test.txt.esp
+</code></pre>
 <p>At this point, foo.test.txt is what the scriptable test framework will request, and that outputs just TEST_PASSED:</p>
-<p>$ curl -u admin:admin http://localhost:8080/apps/foo.test.txt TEST_PASSED</p>
+<pre><code>$ curl -u admin:admin http://localhost:8080/apps/foo.test.txt
+TEST_PASSED
+</code></pre>
 <p>And a POST to the JUnit servlet returns information on the test's execution:</p>
-<p>curl -u admin:admin -XPOST http://localhost:8080/system/sling/junit/org.apache.sling.junit.scriptable.ScriptableTestsProvider.json [{ "INFO_TYPE": "test", "description": "verifyContent<a href="org.apache.sling.junit.scriptable.TestAllPaths">0</a>", "test_metadata": { "test_execution_time_msec": 2 } } ]</p>
-<p>Test failures would be included in this JSON representation - you can test that by modifying the script to fail and making the same request again.</p>
+<pre><code>curl -u admin:admin -XPOST http://localhost:8080/system/sling/junit/org.apache.sling.junit.scriptable.ScriptableTestsProvider.json
+[{
+    &quot;INFO_TYPE&quot;: &quot;test&quot;,
+    &quot;description&quot;: &quot;verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths)&quot;,
+    &quot;test_metadata&quot;: {
+      &quot;test_execution_time_msec&quot;: 2
+    }
+  }
+]
+</code></pre>
+<p>Test failures would be included in this JSON representation - you can test that by modifying the script to fail and making the same request again. </p>
 <h1>Integration tests example</h1>
 <p>The <a href="http://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests">testing/samples/integration-tests</a> module runs some simple integration tests against a Sling Launchpad instance that's setup from scratch before running the tests.</p>
 <p>This module's pom and Java code can be used as examples to setup your own integration testing modules for Sling-based apps - or for any other runnable jar that provides an http service.</p>
@@ -102,8 +129,9 @@ For tighter integration with Sling, the alternate `SlingJUnitServlet` is registe
 <p>The <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/remote/src/main/java/org/apache/sling/junit/remote/exported/ExampleRemoteTest.java">ExampleRemoteTest</a> class demonstrates this. To run it from your IDE, set the <code>sling.remote.test.url</code> in the IDE to the URL of the JUnitServlet, like http://localhost:8080/system/sling/junit for example.</p>
 <h1>Debugging ITs</h1>
 <p>The JVM is usually forked twice during the execution of integration tests. The first time by the <code>maven-surefire-plugin</code> which executes the client-side (i.e. Maven-side) part of the tests. To debug this side the option <code>-Dmaven.surefire.debug</code> can be used which waits for a debugger to be attached on port 5005 before the (client-side) test is executed. More information is available in the <a href="http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html">documentation of the maven-surefire-plugin</a>.</p>
-<p>Then the <code>JarExecutor</code> is forking the VM a second time to start the server (this does not happen if connecting to an already running instance). The system environment variable <code>jar.executor.vm.options</code> can be used to start that VM with debug options. All debug options are described at the <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html#Invocation">JPDA documentation</a>. If running</p>
-<p>mvn test -Djar.executor.vm.options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"</p>
+<p>Then the <code>JarExecutor</code> is forking the VM a second time to start the server (this does not happen if connecting to an already running instance). The system environment variable <code>jar.executor.vm.options</code> can be used to start that VM with debug options. All debug options are described at the <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html#Invocation">JPDA documentation</a>. If running </p>
+<pre><code>mvn test -Djar.executor.vm.options=&quot;-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000&quot;
+</code></pre>
 <p>the server start is interrupted until a debugger is connected on port 8000.</p></section></div></div>            
 <div class="footer">
                 <div class="timestamp">

http://git-wip-us.apache.org/repos/asf/sling-site/blob/3a935d04/documentation/development/sling.html
----------------------------------------------------------------------
diff --git a/documentation/development/sling.html b/documentation/development/sling.html
index aa70a55..3e30d87 100644
--- a/documentation/development/sling.html
+++ b/documentation/development/sling.html
@@ -2,22 +2,22 @@
     <head>
 <meta charset="utf-8"/>
         <title>Apache Sling on JBake</title>
-        <link rel="stylesheet" href="/res/css/site.css"/>
-        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <link rel="stylesheet" href="/ng/res/css/site.css"/>
+        <link rel="icon" href="/ng/res/favicon.ico"/>
         <div class="title">
             <div class="logo">
                 <a href="http://sling.apache.org">
-                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                    <img border="0" alt="Apache Sling" src="/ng/res/logos/sling.svg"/>
                 </a>
             </div><div class="header">
                 <a href="http://www.apache.org">
-                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                    <img border="0" alt="Apache" src="/ng/res/logos/apache.png"/>
                 </a>
             </div>
         </div>        
     </head><body>
 <div class="menu">
-            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+            <strong><a href="/ng/documentation.html">Documentation</a></strong><br/><a href="/ng/documentation/getting-started.html">Getting Started</a><br/><a href="/ng/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/ng/documentation/development.html">Development</a><br/><a href="/ng/documentation/bundles.html">Bundles</a><br/><a href="/ng/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/ng/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/ng/apidocs/sling9/index.html">Sling 9</a><br/><a href="/ng/apidocs/sling8/index.html">Sling 8</a><br/><a href="/ng/apidocs/sling7/index.html">Sling 7</a><br/><a href="/ng/apidocs/sling6/index.html">Sling 6</a><br/><a href="/ng/apidocs/sling5/index.html">Sling 5</a><br/><a href="/ng/javadoc-io.html">Archive at javadoc.io</a><br/><p></p
 ><strong>Project info</strong><br/><a href="/ng/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/ng/contributing.html">Contributing</a><br/><a href="/ng/news.html">News</a><br/><a href="/ng/links.html">Links</a><br/><a href="/ng/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/ng/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.
 org/">Donate!</a><br/><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/ng/sitemap.html">Site Map</a></strong>
         </div>        <div class="main">
 <div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Maven Sling Plugin</h1></header><p>See <a href="http://sling.apache.org/components/maven-sling-plugin/">Apache Maven Sling Plugin documentation</a>.</p></section></div></div>            
 <div class="footer">

http://git-wip-us.apache.org/repos/asf/sling-site/blob/3a935d04/documentation/development/slingstart.html
----------------------------------------------------------------------
diff --git a/documentation/development/slingstart.html b/documentation/development/slingstart.html
index 5fb0684..258286e 100644
--- a/documentation/development/slingstart.html
+++ b/documentation/development/slingstart.html
@@ -2,22 +2,22 @@
     <head>
 <meta charset="utf-8"/>
         <title>Apache Sling on JBake</title>
-        <link rel="stylesheet" href="/res/css/site.css"/>
-        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <link rel="stylesheet" href="/ng/res/css/site.css"/>
+        <link rel="icon" href="/ng/res/favicon.ico"/>
         <div class="title">
             <div class="logo">
                 <a href="http://sling.apache.org">
-                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                    <img border="0" alt="Apache Sling" src="/ng/res/logos/sling.svg"/>
                 </a>
             </div><div class="header">
                 <a href="http://www.apache.org">
-                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                    <img border="0" alt="Apache" src="/ng/res/logos/apache.png"/>
                 </a>
             </div>
         </div>        
     </head><body>
 <div class="menu">
-            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+            <strong><a href="/ng/documentation.html">Documentation</a></strong><br/><a href="/ng/documentation/getting-started.html">Getting Started</a><br/><a href="/ng/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/ng/documentation/development.html">Development</a><br/><a href="/ng/documentation/bundles.html">Bundles</a><br/><a href="/ng/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/ng/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/ng/apidocs/sling9/index.html">Sling 9</a><br/><a href="/ng/apidocs/sling8/index.html">Sling 8</a><br/><a href="/ng/apidocs/sling7/index.html">Sling 7</a><br/><a href="/ng/apidocs/sling6/index.html">Sling 6</a><br/><a href="/ng/apidocs/sling5/index.html">Sling 5</a><br/><a href="/ng/javadoc-io.html">Archive at javadoc.io</a><br/><p></p
 ><strong>Project info</strong><br/><a href="/ng/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/ng/contributing.html">Contributing</a><br/><a href="/ng/news.html">News</a><br/><a href="/ng/links.html">Links</a><br/><a href="/ng/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/ng/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.
 org/">Donate!</a><br/><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/ng/sitemap.html">Site Map</a></strong>
         </div>        <div class="main">
 <div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>The Apache Sling Provisioning Model and Apache SlingStart</h1></header><p>[TOC]</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>
@@ -47,11 +47,17 @@
 <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. As usually the provisioned artifacts are bundles and as start levels are pretty handy, this was conscious design decision in order to keep the model files small.</p>
 <h3>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. For a plain jar the text definition for an artifact is:</p>
-<p>groupId/artifactId/version org.apache.sling/api/2.8.0</p>
+<pre><code>            groupId/artifactId/version
+            org.apache.sling/api/2.8.0
+</code></pre>
 <p>If you want to specify the type, it's appended after the version:</p>
-<p>groupId/artifactId/version/type org.apache.sling/api/2.8.0/jar</p>
+<pre><code>            groupId/artifactId/version/type
+            org.apache.sling/api/2.8.0/jar
+</code></pre>
 <p>If you want to specify the classifier, it gets appended after the type:</p>
-<p>groupId/artifactId/version/type/classifier org.apache.sling/api/2.8.0/jar/test</p>
+<pre><code>            groupId/artifactId/version/type/classifier
+            org.apache.sling/api/2.8.0/jar/test
+</code></pre>
 <h3>Configurations</h3>
 <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>
@@ -61,11 +67,16 @@
 </ul>
 <h4>Bootstrap Command File</h4>
 <p>The bootstrap configuration is a text block consisting of uninstall directives. This block is only executed on the first startup.</p>
-<p>[feature name=:launchpad]</p>
-<p>[configurations]</p>
-<h1>uninstall obsolete bundles which are neither not required anymore or are</h1>
-<h1>replaced with new bundles</h1>
-<p>:bootstrap uninstall org.apache.sling.fragment.activation 1.2 uninstall org.apache.sling.installer.api [1.0,2.0) uninstall org.apache.sling.tests</p>
+<pre><code>[feature name=:launchpad]
+
+[configurations]
+   # uninstall obsolete bundles which are neither not required anymore or are
+   # replaced with new bundles
+:bootstrap
+  uninstall org.apache.sling.fragment.activation 1.2
+  uninstall org.apache.sling.installer.api [1.0,2.0)
+  uninstall org.apache.sling.tests
+</code></pre>
 <p>Each uninstall directive starts with the text "uninstall" followed by the bundle symbolic name. A version range can be specified as well. If no version information is specified, the bundle with that symbolic name is uninstalled on startup. If a version is specified, the bundle is only uninstalled if it's installed with the exact same version. If a range is specified, the bundle is only uninstalled, if the version is within that range.</p>
 <h3>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>
@@ -77,32 +88,67 @@
 </ul>
 <h2>Model Files</h2>
 <p>The model comes also with a textual description language:</p>
-<p>[feature name=my-feature]
-[variables] eventadmin.version=1.0.0 metatype.version=1.2.0</p>
-<p>[artifacts] org.apache.sling/eventadmin/${eventadmin.version} org.apache.sling/metatype/${metatype.version} org.apache.sling/coordinator/3.0.0</p>
-<p>[configurations] org.apache.sling.eventadmin useQueue=true ignoreTopics=["myTopic"]</p>
+<pre><code>[feature name=my-feature]
+    [variables]
+        eventadmin.version=1.0.0
+        metatype.version=1.2.0
+
+    [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=[&quot;myTopic&quot;]
+</code></pre>
 <p>A configuration for a run mode looks like this:</p>
-<p>[feature name=my-feature]
-[variables] eventadmin.version=1.0.0 metatype.version=1.2.0</p>
-<p>[artifacts runModes=mymode] org.apache.sling/metatype/${metatype.version}</p>
-<p>[artifacts startLevel=5 runModes=mymode] org.apache.sling/eventadmin/${eventadmin.version}</p>
-<p>[configurations runModes=mymode] org.apache.sling.eventadmin useQueue=true ignoreTopics=["myTopic"]</p>
+<pre><code>[feature name=my-feature]
+    [variables]
+        eventadmin.version=1.0.0
+        metatype.version=1.2.0
+
+    [artifacts runModes=mymode]
+       org.apache.sling/metatype/${metatype.version}
+
+    [artifacts startLevel=5 runModes=mymode]
+       org.apache.sling/eventadmin/${eventadmin.version}
+
+    [configurations runModes=mymode]
+       org.apache.sling.eventadmin
+          useQueue=true
+          ignoreTopics=[&quot;myTopic&quot;]
+</code></pre>
 <h3>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>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>
-<p>name ::= <pid> ( '-' <subname> )</p>
+<pre><code>name ::= &lt;pid&gt; ( &#39;-&#39; &lt;subname&gt; )
+</code></pre>
 <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>
-<h1>Configuration for Managed Service com.acme.xyz</h1>
-<p>com.acme.xyz //</p>
-<h1>Managed Service Factory, creates an instance for com.acme.abc</h1>
-<p>com.acme.abc-default</p>
+<pre><code># Configuration for Managed Service com.acme.xyz
+com.acme.xyz // 
+# Managed Service Factory, creates an instance for com.acme.abc
+com.acme.abc-default
+</code></pre>
 <h3>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>
-<p>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> (see below)</p>
+<pre><code>file ::= (comment) (header) *
+comment ::= &#39;#&#39; &lt;any&gt;
+header ::= prop &#39;=&#39; value
+prop ::= symbolic-name // 1.4.2 of OSGi Core Specification
+symbolic-name ::= token { &#39;.&#39; token } 
+token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | &#39;_&#39; | &#39;-&#39; }
+value ::= [ type ] ( &#39;[&#39; values &#39;]&#39; | &#39;(&#39; values &#39;)&#39; | simple ) 
+values ::= simple { &#39;,&#39; simple } 
+simple ::= &#39;&quot;&#39; stringsimple &#39;&quot;&#39;
+type ::= &lt;1-char type code&gt;
+stringsimple ::= &lt;quoted string representation of the value&gt; (see below)
+</code></pre>
 <p>The 1 character type code is one of:</p>
 <ul>
   <li>'T' : simple string</li>
@@ -118,7 +164,9 @@
 <p>Apart from the escaping of the usual characters like the quotes, double quotes, backslash etc. the equals sign and spaces need to be escaped as well!</p>
 <h3>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>
-<p>com.acme.xyz [format=properties] ftp.port = 21</p>
+<pre><code>com.acme.xyz [format=properties]     
+    ftp.port = 21
+</code></pre>
 <p>Notice that this definition only supports string properties. Therefore the service consuming the configuration needs to be able to adapt a string value to the correct type.</p>
 <h2>Slingstart and Slingfeature projects</h2>
 <p>The <code>slingstart-maven-plugin</code> introduces two new packaging types:</p>
@@ -127,38 +175,63 @@
   <li><code>slingfeature</code> : 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>
+<pre><code>[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
+</code></pre>
 <p>The resulting model is a merged model, starting with the dependencies and then merging in the current model.</p>
 <p>By default the Maven classpath is extended by the dependencies of the merged model. This behaviour can be disabled though via setting the parameter <code>disableExtendingMavenClasspath</code> to <code>true</code> (<a href="https://issues.apache.org/jira/browse/SLING-6541">SLING-6541</a>).</p>
 <h2>Model Merging</h2>
-<p>If two or more models are supplied, they are merged feature by feature, each feature being treated as a separate unit.</p>
-<p>Within a feature each run mode is treated separately as well.</p>
+<p>If two or more models are supplied, they are merged feature by feature, each feature being treated as a separate unit. </p>
+<p>Within a feature each run mode is treated separately as well. </p>
 <p>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>
 <p>The supplied models are ordered alphanumercally by their filenames for merging.</p>
 <h3>Removing and Changing of Artifacts</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>
+<pre><code>[artifacts]
+    my/special/artifact/1.0.0
+    commons/library/1.0.0
+
+[artifacts runModes=test]
+    another/one/2.1.0
+</code></pre>
 <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>
   <li>Remove the "special artifact"</li>
   <li>Remove the "another one"</li>
 </ul>
-<p>The changing model would mention the above as one artifact and in addition have: [artifacts startLevel=5] commons/library/1.1.0</p>
-<p>[artifacts runModes=:remove] my/special/artifact/0.0.0</p>
-<p>[artifacts runModes=:remove,test] another/one/0.0.0</p>
+<p>The changing model would mention the above as one artifact and in addition have:  [artifacts startLevel=5]  commons/library/1.1.0</p>
+<pre><code>[artifacts runModes=:remove]
+    my/special/artifact/0.0.0
+
+[artifacts runModes=:remove,test]
+    another/one/0.0.0
+</code></pre>
 <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>Removing and Changing of Configurations</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>
+<pre><code>[configurations]
+    my.special.configuration.b
+      foo=&quot;bar&quot;
+    another.special.configuration.a
+      x=&quot;y&quot;
+</code></pre>
 <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>
-<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".</p>
+<pre><code>[configurations]
+    my.special.configuration.b
+      a=&quot;b&quot;
+
+[configurations runModes=:remove]
+    another.special.configuration.a
+</code></pre>
+<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". </p>
 <p>It is also possible to merge configurations:</p>
-<p>[configurations] my.special.configuration.b [mode=merge] a="b"</p>
+<pre><code>[configurations]
+    my.special.configuration.b [mode=merge]
+      a=&quot;b&quot;
+</code></pre>
 <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>
 <p>If a merged configuration redefines a property that already exists, it overwrites it, so the last configuration supplied in a merge wins.</p>
 <h2>Starting a server</h2>
@@ -180,8 +253,86 @@
       <th>Mandatory</th>
     </tr>
   </thead>
+  <tbody>
+    <tr>
+      <td>port </td>
+      <td>String </td>
+      <td>The port on which the server is listening for HTTP requests. Arbitrary if not set. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>id </td>
+      <td>String </td>
+      <td>The instance id for this server. If not set the id is automatically generated from the run modes and the port. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>runmode </td>
+      <td>String </td>
+      <td>The comma-separated list of <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html#run-modes">run modes</a> to be set for this server. Those will be set in addition to the ones being defined by the underlying model. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>contextPath </td>
+      <td>String </td>
+      <td>The context path. If not set then Sling is deployed in the root context. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>controlPort </td>
+      <td>String </td>
+      <td>The TCP <a href="/documentation/the-sling-engine/the-sling-launchpad.html#control-port">control port</a> on which the server is listening for control commands. Arbitrary if not set. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>instances </td>
+      <td>int </td>
+      <td>The number of instances which should be created from this server element. In this case the configuration acts as template. The port and controlPort for all servers being generated from this configuration are random (except for the first server). </td>
+      <td>1 </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>folder </td>
+      <td>String </td>
+      <td>The folder from where to start Sling. If not set is a folder in the project's build directory named like the <code>id</code>. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>vmOpts </td>
+      <td>String </td>
+      <td>The JVM options to use. </td>
+      <td><code>-Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true</code> </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>opts </td>
+      <td>String </td>
+      <td>Additional application options. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>debug </td>
+      <td>String </td>
+      <td>See below for an explanation. </td>
+      <td>(-) </td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>stdOutFile </td>
+      <td>String </td>
+      <td>The relative filename of the file which receives both the standard output (stdout) and standard error (stderr) of the server processes. If null or empty string the server process inherits stdout from the parent process (i.e. the Maven process). The given filename must be relative to the working directory of the according server. This was added with <a href="https://issues.apache.org/jira/browse/SLING-6545">SLING-6545</a>. </td>
+      <td>null </td>
+      <td>no</td>
+    </tr>
+  </tbody>
 </table>
-<p>port | String | The port on which the server is listening for HTTP requests. Arbitrary if not set. | - | no id | String | The instance id for this server. If not set the id is automatically generated from the run modes and the port. | - | no runmode | String | The comma-separated list of <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html#run-modes">run modes</a> to be set for this server. Those will be set in addition to the ones being defined by the underlying model. | - | no contextPath | String | The context path. If not set then Sling is deployed in the root context. | - | no controlPort | String | The TCP <a href="/documentation/the-sling-engine/the-sling-launchpad.html#control-port">control port</a> on which the server is listening for control commands. Arbitrary if not set. | - | no instances | int | The number of instances which should be created from this server element. In this case the configuration acts as template. The port and controlPort 
 for all servers being generated from this configuration are random (except for the first server). | 1 | no folder | String | The folder from where to start Sling. If not set is a folder in the project's build directory named like the <code>id</code>. | - | no vmOpts | String | The JVM options to use. | <code>-Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true</code> | no opts | String | Additional application options. | - | no debug | String | See below for an explanation. | - | no stdOutFile | String | The relative filename of the file which receives both the standard output (stdout) and standard error (stderr) of the server processes. If null or empty string the server process inherits stdout from the parent process (i.e. the Maven process). The given filename must be relative to the working directory of the according server. This was added with <a href="https://issues.apache.org/jira/browse/SLING-6545">SLING-6545</a>. | null | no</p>
 <h3>Debugging</h3>
 <p>Since version 1.2.0 of this plugin it is possible to easily start a Sling server in debug mode (<a href="https://issues.apache.org/jira/browse/SLING-4677">SLING-4677</a>). For that you either configure the property <code>debug</code> inside you server configuration in the pom.xml accordingly or by using the parameter <code>Dlaunchpad.debug</code>. Both values can either be <code>true</code> (in which case the <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html#Invocation">JDWP options</a> <code>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000</code> are appended to the VM options) or just some arbitrary string defining debugging options. In case both are used the parameter <code>Dlaunchpad.debug</code> takes precedence.</p>
 <h2>Stopping a server</h2>
@@ -191,7 +342,20 @@
 <p>The provisioning model supports two formats to define configurations, properties and the format of the Apache Felix ConfigAdmin implementation.</p>
 <p>Starting with version 1.2.0 of the provisioning model and version 1.2.0 of the slingstart-maven-plugin, the implementation uses the latest format from Apache Felix, version 1.8.6 (or higher) of the ConfigAdmin. This requires you to use version 3.6.6 (or higher) of the OSGi installer core bundle to handle these configurations.</p>
 <p>If you want to stick with the old format from config admin, you can configure the maven plugin as follows:</p>
-<p><plugin> <groupId>org.apache.sling</groupId> <artifactId>slingstart-maven-plugin</artifactId> <extensions>true</extensions> <version>1.3.4</version> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.configadmin</artifactId> <version>1.8.4</version> </dependency> </dependencies> </plugin></p></section></div></div>            
+<pre><code>&lt;plugin&gt;
+    &lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
+    &lt;artifactId&gt;slingstart-maven-plugin&lt;/artifactId&gt;
+    &lt;extensions&gt;true&lt;/extensions&gt;
+    &lt;version&gt;1.3.4&lt;/version&gt;
+    &lt;dependencies&gt;
+        &lt;dependency&gt;
+            &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
+            &lt;artifactId&gt;org.apache.felix.configadmin&lt;/artifactId&gt;
+            &lt;version&gt;1.8.4&lt;/version&gt;
+        &lt;/dependency&gt;
+    &lt;/dependencies&gt;
+&lt;/plugin&gt;
+</code></pre></section></div></div>            
 <div class="footer">
                 <div class="timestamp">
                     TODO display revision number here