Author: buildbot
Date: Fri Dec  9 08:35:12 2016
New Revision: 1002489

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/models.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Dec  9 08:35:12 2016
@@ -1 +1 @@
-1773294
+1773335

Modified: websites/staging/sling/trunk/content/documentation/bundles/models.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/models.html 
(original)
+++ websites/staging/sling/trunk/content/documentation/bundles/models.html Fri 
Dec  9 08:35:12 2016
@@ -147,7 +147,7 @@ h2:hover > .headerlink, h3:hover > .head
 <li><a href="#specifying-an-alternate-adapter-class-since-110">Specifying an 
Alternate Adapter Class (since 1.1.0)</a></li>
 <li><a 
href="#associating-a-model-class-with-a-resource-type-since-130">Associating a 
Model Class with a Resource Type (since 1.3.0)</a></li>
 <li><a href="#exporter-framework-since-130">Exporter Framework (since 
1.3.0)</a></li>
-<li><a 
href="#registration-of-sling-models-classes-via-bnd-plugin-since-134">Registration
 of Sling Models classes via bnd plugin (since 1.3.4)</a></li>
+<li><a 
href="#registration-of-sling-models-classes-via-bnd-plugin">Registration of 
Sling Models classes via bnd plugin</a></li>
 </ul>
 </div>
 <p>Many Sling projects want to be able to create model objects - POJOs which 
are automatically mapped from Sling objects, typically resources, but also 
request objects. Sometimes these POJOs need OSGi services as well.</p>
@@ -738,8 +738,8 @@ currently includes a single exporter, us
 <p>results in the registration of a servlet with the resource type and 
extension specified and a selector of 'model' (overridable 
 through the <code>@Exporter</code> annotation's <code>selector</code> 
attribute). When this servlet is invoked, the <code>Resource</code> will be 
adapted to the 
 model, exported as a <code>java.lang.String</code> (via the named Exporter) 
and then returned to the client.</p>
-<h1 
id="registration-of-sling-models-classes-via-bnd-plugin-since-134">Registration 
of Sling Models classes via bnd plugin (since 1.3.4)<a class="headerlink" 
href="#registration-of-sling-models-classes-via-bnd-plugin-since-134" 
title="Permanent link">&para;</a></h1>
-<p>Since Sling Models Implementation 1.3.4 it is possible to automatically 
generated the necessary bundle header to register the Sling Models classes 
contained in the Maven bundle project by using the Sling Models bnd plugin - 
either with maven-bundle-plugin or with bnd-maven-plugin. By default the plugin 
generates a <code>Sling-Model-Classes</code> header.</p>
+<h1 id="registration-of-sling-models-classes-via-bnd-plugin">Registration of 
Sling Models classes via bnd plugin<a class="headerlink" 
href="#registration-of-sling-models-classes-via-bnd-plugin" title="Permanent 
link">&para;</a></h1>
+<p>With the Sling Models bnd plugin it is possible to automatically generated 
the necessary bundle header to register the Sling Models classes contained in 
the Maven bundle project - either with maven-bundle-plugin or with 
bnd-maven-plugin. By default the plugin generates a 
<code>Sling-Model-Classes</code> header (only compatible with Sling Models Impl 
since version 1.3.4, see <a 
href="https://issues.apache.org/jira/browse/SLING-6308";>SLING-6308</a>).</p>
 <p>Example configuration:</p>
 <table class="codehilitetable"><tr><td class="linenos"><div 
class="linenodiv"><pre> 1
  2
@@ -778,8 +778,20 @@ model, exported as a <code>java.lang.Str
 </td></tr></table>
 
 <p>If a <code>Sling-Model-Packages</code> or <code>Sling-Model-Classes</code> 
was already manually defined for the bundle the bnd plugin does nothing. So if 
you want to migrate an existing project to use this plugin remove the existing 
header definitions.</p>
+<p>If you want to generate a bundle header compliant with Sling Models &lt; 
1.3.4 (i.e. <code>Sling-Model-Packages</code>) you need to specify the 
attribute <code>generatePackagesHeader=true</code>. An example configuration 
looks like this</p>
+<table class="codehilitetable"><tr><td class="linenos"><div 
class="linenodiv"><pre>1
+2
+3
+4
+5</pre></div></td><td class="code"><div class="codehilite"><pre><span 
class="nt">&lt;configuration&gt;</span>
+    <span class="nt">&lt;instructions&gt;</span>
+        <span 
class="nt">&lt;_plugin&gt;</span>org.apache.sling.bnd.models.ModelsScannerPlugin;generatePackagesHeader=true<span
 class="nt">&lt;/_plugin&gt;</span>
+    <span class="nt">&lt;/instructions&gt;</span>
+<span class="nt">&lt;/configuration&gt;</span>
+</pre></div>
+</td></tr></table>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
-        Rev. 1773192 by kwin on Thu, 8 Dec 2016 07:20:57 +0000
+        Rev. 1773335 by kwin on Fri, 9 Dec 2016 08:34:52 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project


Reply via email to