【发布时间】:2018-12-10 19:17:32
【问题描述】:
使用 JDK 10 构建我的 OSGi 包时,maven-bundle-plugin (3.5.1) 会生成以下清单属性:
Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"
运行时失败:
Unresolved requirements: [[com.mycompany.mybundle [1](R 1.0)] osgi.ee; (osgi.ee=UNKNOWN)]
使用 JDK 9 构建时,我得到了预期:
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9.0))"
我将 maven-compiler-plugin 的源版本和目标版本分别设置为“1.9”和“10”。
目前,我正在使用一种解决方法来阻止插件将osgi.ee 添加到清单中:
<configuration>
<instructions>
<_noee>true</_noee>
</instructions>
</configuration>
.. 但我宁愿有正确的 Java 10 要求。
【问题讨论】:
标签: maven osgi java-10 bnd maven-bundle-plugin