rombert commented on code in PR #47:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/47#discussion_r1636574972


##########
readme.md:
##########
@@ -138,9 +147,19 @@ A typical configuration for platform applications is:
           "error": false,
           "warning": false
         }
-      }
+      },
+      "system.bundle": {}
+    },
+     "framework":{
+       "id":"org.apache.felix:org.apache.felix.framework:7.0.5"
+      },
+      "javaVersion": "21"
     }
 }
 ```
 
-This ensures that warnings related to the platform are not reported when the 
feature is aggregated with downstream (consumer) applications. The manifests 
should not be inlined under normal circumstances, since it greatly increases 
the size of the resulting features.
+This ensures that 
+
+- warnings related to the platform are not reported when the feature is 
aggregated with downstream (consumer) applications. The manifests should not be 
inlined under normal circumstances, since it greatly increases the size of the 
resulting features.
+- metadata related to the system bundle is recorded at the Java 21 
compatibility level

Review Comment:
   This is a recommentation for platforms, like the Sling Starter. Perhaps it 
would be better worded as an example, because we now define Java 21 and that 
may not be the case for everyone.
   
   The metadata is recorded with the Java 21 level because that is what is 
defined in the execution-environment extension. If the aggregation is executed 
with Java 11 then it will fail.
   
   Note that we have two phases in which the analyser metadata comes into play:
   - aggregation, when the metadata is recorded
   - validation, when the metadata is used
   
   On aggregation this sample configuration _requires_ Java 21.
   On validation this configuration will make sure that bundle requirements are 
validated against Java 21.
   
   Following up on the Sling Starter, this would be applicable when building a 
project that imports a Sling Starter aggregated feature (like oak_tar ) and 
building with a Java version != 21. At that point the validators will use the 
Java 21 metadata.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to