gjo*_*anv 7 java osgi maven-bundle-plugin java-9
添加包含JPMS模块的依赖项后,maven-bundle-plugin(版本3.3.0)将失败:
[INFO] --- maven-bundle-plugin:3.3.0:bundle (default-bundle) @ my-bundle ---
[ERROR] Bundle myGroup:my-bundle:bundle:1.0 :
Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle myGroup:my-bundle:bundle:1.0 :
Invalid class file module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
Run Code Online (Sandbox Code Playgroud)
似乎插件尝试(并且失败)来分析module-info.class,这在OSGi上下文中应该是无关紧要的.
gjo*_*anv 13
将捆绑包插件升级到版本3.5.0解决了以下问题:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.0</version>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我还必须将maven升级到3.5,因为最新版本的插件在maven 3.3上投了一个NPE:
Failed to execute goal org.apache.felix:maven-bundle-plugin:3.5.0:bundle (default-bundle) on project my-bundle: Execution default-bundle of goal org.apache.felix:maven-bundle-plugin:3.5.0:bundle failed. NullPointerException
Run Code Online (Sandbox Code Playgroud)