[
https://issues.apache.org/jira/browse/SLING-12353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856753#comment-17856753
]
Robert Munteanu commented on SLING-12353:
-----------------------------------------
I think one of the problems here is that extension is activated whenever
present on the classpath (via the ServiceLoader mechanism). The intention is
cleary to have this activated on some scenarios and them the metadata to only
be reused.
The better aproach would be to require manual activation whenever needed. Since
the usual entry point for generating the metadata is through the
slingfeature-maven-plugin, we could add an extension there.
> AnalyserMetadataHandler should record that manifest caching was skipped for
> subsequent runs
> -------------------------------------------------------------------------------------------
>
> Key: SLING-12353
> URL: https://issues.apache.org/jira/browse/SLING-12353
> Project: Sling
> Issue Type: Improvement
> Components: Feature Model Analyser
> Reporter: Robert Munteanu
> Priority: Major
> Fix For: Feature Model Analyser 2.0.8
>
>
> Consider the following scenario:
> 1. In feature A, the analyser-metadata extension is configured with:
> {code}
> {
> "analyser-metadata:JSON|true":
> {
> "org.apache.sling:org.apache.sling.api:2.0.6" : {
> "manifest": null,
> "report": {
> "error": false,
> "warning": false
> }
> }
> }
> {code}
> 2. During aggregation, feature A is processed with the analyser-metadata
> extension, resulting in feature B.
> This will result in a the "report" key being retained but not the manifest.
> 3. At a later point, feature B is aggregated again, resulting in feature C.
> During the aggregation process, the manifest will be cached because the
> {{"manifest": null}} key was not preserved during the first aggregation. This
> is unexpected and should be fixed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)