How to configure maven-bundle-plugin to exclude Im

2019-02-11 04:33发布

I use maven-bundle-plugin to create OSGi compliance jars. It generates expected OSGi MANIFEST, except Import-Service and Export-Service.

According to http://wiki.osgi.org/wiki/Import-Service, using Import-Service is deprecated. No wonder I failed to start a consumer bundle in distributed fabric mode (cluster). The bundle's MANIFEST contains Import-Service entry which causes it to wait (grace period). It started perfectly as I remove that entry manually.

So, how to configure maven-bundle-plugin to exclude Import-Service and Export-Service from it's generated JARs? It's really troublesome if I have to remove the entry manually.

Thanks

标签: osgi fuseesb
1条回答
走好不送
2楼-- · 2019-02-11 05:04

Inside instructions element for plugin configuration you may add:

<_removeheaders>Import-Service,Export-Service</_removeheaders>

This is equivalent of -removehaders flag in bnd.

查看更多
登录 后发表回答