How to configure maven-bundle-plugin to exclude Import-Service and Export-Service?

夙愿已清 提交于 2019-11-29 23:20:30

问题


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


回答1:


Inside instructions element for plugin configuration you may add:

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

This is equivalent of -removehaders flag in bnd.



来源:https://stackoverflow.com/questions/18504379/how-to-configure-maven-bundle-plugin-to-exclude-import-service-and-export-servic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!