我有一個使用maven-bundle-plugin生成OSGI包的項目。配置是這樣的:maven-bundle-plugin問題(OSGI)
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<inherited>true</inherited>
<configuration>
<instructions>
<Export-Package>${bubble.osgi.exports}</Export-Package>
<Import-Package>${bubble.osgi.imports}</Import-Package>
<Embed-Dependency>${bubble.osgi.embed.dependencies}</Embed-Dependency>
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
</instructions>
<versions>
<bubble.osgi.version.clean>${project.version}</bubble.osgi.version.clean>
</versions>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>cleanVersions</goal>
</goals>
</execution>
</executions>
</plugin>
該項目的成果是與所有OSGi的東西,一個JAR文件,內嵌的依賴等列入。我寧願有兩個瓶子作爲結果,一個包含osgi的東西,一個沒有,因爲嵌入的依賴關係在使用它的時候會造成問題,就像一個普通的jar。
是否有任何其他方式比使用maven程序集插件呢?