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

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 786c504  Add section about OBR
     new abb590b  Merge branch 'master' of github.com:apache/sling-whiteboard
786c504 is described below

commit 786c504f19d7e17bd09c8b12e75e7a3e9635b384
Author: Carsten Ziegeler <cziege...@apache.org>
AuthorDate: Mon Nov 6 12:33:56 2017 +0100

    Add section about OBR
---
 featuremodel/feature/readme.md | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/featuremodel/feature/readme.md b/featuremodel/feature/readme.md
index 2fbf1f4..facc995 100644
--- a/featuremodel/feature/readme.md
+++ b/featuremodel/feature/readme.md
@@ -208,9 +208,29 @@ This is a feature example:
         }
     }
 
-# Relation to OBR
+# Relation to Repository Specification (Chapter 132)
+
+There are two major differences between a repository as described in the 
Repository Service Description and the feature model. A repository contains a 
list of more or less unrelated resources whereas a feature describes resources 
as a unit. For example a feature allows to define a bundle together with OSGi 
configurations - which ensures that whenever this feature is used, the bundle 
*together with* the configurations are deployed. A repository can only describe 
the bundle as a separate r [...]
+
+The second difference is the handling of requirements and capabilities. While 
a repository is supposed to list all requirements and capabilities of a 
resource as part of the description, the feature model does not require this. 
As the feature model refers to the bundle and the bundle has the requirements 
and capabilities as metadata, there is no need to repeat that information.
+
+By these two differences you can already tell, that a repository contents is 
usually generated by tools while a feature is usually a human created resource. 
While it is possible to create a repository index out of a feature, the other 
way round does not work as the repository has no standard way to define 
relationships between resources.
+
+# Requirements and Capabilities of Artifacts
+
+The feature model does not allow to explicitly list requirements or 
capabilities for artifacts. An artifact, for example a bundle, contains this 
information as part of its metadata. However, to calculate or display these, 
the tool processing the feature needs to have access to the artifact and needs 
to extract this. While in general this does not pose a problem by itself, it 
might happen that the same artifact is processed several times for example 
during a build process, causing overhead.
+
+To avoid this, a feature might contain an additional section, named "reqscaps" 
(TODO find a better name). This section is grouped by artifact ids and contains 
the requirements and capabilities of each artifact. While the requirements and 
capabilities of a single artifact must be correct and neither leave out or add 
additional ones, the list of artifacts must not be complete. Tooling will first 
look into this section to get requirements and capabilities for an artifact. If 
there are none, [...]
+
+    {
+        ...
+        "reqscaps" : {
+            "org.apache.sling:org.apache.sling.scripting.jsp:1.0.0" : {
+                "capabilities" : [],
+                "requirements" : []
+            }
+        }
 
-TODO
 
 # Provisioning Applications
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <commits@sling.apache.org>'].

Reply via email to