我在本地的开发环境中有一个maven项目。当我运行:"mvn clean install“时,它基本上在'Target‘目录中创建了一个JAR文件。我已经启动并运行了Servicemix。我想知道是否可以将这个JAR转换为OSGI bundle并直接部署到ServiceMix容器中。
谢谢。
发布于 2013-07-09 15:22:04
只需在您的pom中使用maven bundle插件,它将嵌入到构建过程中,并创建一个jar包(添加所需的OSGi清单)。
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
</instructions>
</plugin>
https://stackoverflow.com/questions/17529667
复制相似问题