且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由于“无法执行目标org.apache.felix:maven-bundle-plugin:2.5.3",Maven构建失败.

更新时间:2022-06-01 22:41:06

在主pom.xml中添加以下插件代码

Add below plugin code in your main pom.xml

<plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>2.5.3</version>
                        <inherited>true</inherited>
                    </plugin>

并且在软件包pom.xml中的插件代码下方

And below plugin code in your bundle pom.xml

<plugin>
                   <groupId>org.apache.felix</groupId>
                   <artifactId>maven-bundle-plugin</artifactId>
                   <extensions>true</extensions>
                   <configuration>
                       <instructions>

                           <import-package>javax.inject;version=1.0.0,*</import-package>

                       </instructions>
                   </configuration>
               </plugin>