When building my OSGi bundles with JDK 10, maven-bundle-plugin (3.5.1) generates the following manifest attribute:
Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"
This fails runtime:
Unresolved requirements: [[com.mycompany.mybundle [1](R 1.0)] osgi.ee; (osgi.ee=UNKNOWN)]
When building with JDK 9, I get the expected:
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9.0))"
I set the source and target versions for maven-compiler-plugin to '1.9' and '10' respectively.
At the moment, I'm using a workaround to stop the plugin from adding osgi.ee
to the manifest:
<configuration>
<instructions>
<_noee>true</_noee>
</instructions>
</configuration>
.. but I would rather have the correct Java 10 requirement.