-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osgi.ee computation needs to take modules-info.class into account #5334
Comments
There can be multiple module-info.class files in a multi-release jar. Meanwhile all the code in the jar is compiled to Java 8 which is still a perfectly valid jar and very much a valid use case. What you might want is a |
This is independent of multi-release, you can try that out with a plan jar where all classes are compiled with java 8 and the module-info.class is compiled with java 9
Yes see #5331, still BND then generates for the version/9 part |
osgi.ee computation must not take into account module-info.class. OSGi (consumer of osgi.ee) and JPMS (consumer of module-info.class) are mutually exclusive. While a jar can be built which is both a proper JPMS module and a proper OSGi bundle, the jar cannot be simultaneously loaded by both OSGi and JPMS. In the OSGi case, module-info.class is ignored by OSGi bundle class loaders. So the class version of module-info.class is not material to OSGi. In the JPMS case, osgi.ee is ignored by JPMS. So the osgi.ee version is not material to JPMS. |
I noticed when working on the multirelease support that when I have a jar file analyzed that is all java-8 with the exception of the
modules-info.class
then BND generates the following headerRequire-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
while I would expect it to be:
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9))"
The text was updated successfully, but these errors were encountered: