Robert Munteanu created SLING-13398:
---------------------------------------

             Summary: Feature analyser does not properly handle multi-release 
jars
                 Key: SLING-13398
                 URL: https://issues.apache.org/jira/browse/SLING-13398
             Project: Sling
          Issue Type: Improvement
          Components: Feature Model Analyser, Maven Plugins and Archetypes
            Reporter: Robert Munteanu
            Assignee: Robert Munteanu
             Fix For: Feature Model Analyser 2.0.22, OSGi Feature Maven Plugin 
1.9.8


The Sling Feature Analyser currently reads only a bundle’s root 
META-INF/MANIFEST.MF, ignoring the OSGi supplemental manifests in multi-release 
JARs.

This produces incorrect dependency errors when the running JVM would use 
different metadata. For example, Reactor Core 3.8.8 imports {{sun.misc}} in its 
Java 8 root manifest, but removes that import in its Java 11 and Java 21 
supplemental manifests. Analysis on Java 11+ nevertheless reports an unresolved 
{{sun.misc}} import.

The analyser already discovers framework packages and capabilities using the 
running JVM. Bundle manifest selection should reflect that same JVM.

The analyser should follow the OSGi spec when encountering multi-release jars, 
see section 3.2.8 - 
https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#framework.module-multireleasejar



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to