Mik*_*ben 9

另一种方法是只使用bundle:bundle目标,然后在你的pom.xml中配置类似于以下内容的插件:

<plugin>
   <groupId>org.apache.felix</groupId>
   <artifactId>maven-bundle-plugin</artifactId>
   <configuration>
      <instructions>
         <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency>
         <_exportcontents>*</_exportcontents>
      </instructions>
   </configuration>
 </plugin>
Run Code Online (Sandbox Code Playgroud)

您可以通过更改通配符"*",范围等属性来控制嵌入和导出的依赖项.