http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-2.3.7/doc/site/wrap-mojo.html表示bundle:wrap
已弃用,与bundle:bundleall
相同。我目前使用wrap
从非OSGi依赖项创建OSGi捆绑包,如http://www.lucamasini.net/Home/osgi-with-felix/creating-osgi-bundles-of-your-maven-dependencies所述。应该用什么代替它们?什么是弃用的原因是什么?
最佳答案
另一种选择是只使用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>
您可以通过更改通配符“*”,范围等属性来控制嵌入和导出哪些依赖项。
关于maven - 为什么不赞成使用maven-bundle-plugin的wrap/bundleall目标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10103666/