maven中添加bundle类型的依赖包

来源:互联网 发布:mac ps如何添加字体 编辑:程序博客网 时间:2024/06/05 16:38

众所周知,bundle是OSGI中的依赖单元,是一种特殊格式的jar,但我们同样可以在maven中使用bundle类型的依赖包,在maven中依赖bundle类型的包,需要加入处理bundle类型的插件,在pom.xml文件中添加如下的代码即可

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>  
    <artifactId>maven-bundle-plugin</artifactId>  
    <extensions>true</extensions>  
</plugin>
</plugins>
</build>

这样我们就可以添加bundle类型的依赖包了,比如mina-core

<dependency>
    <groupId>org.apache.mina</groupId>
    <artifactId>mina-core</artifactId>
    <version>2.0.9</version>
    <type>bundle</type>
</dependency>

0 0
原创粉丝点击