Bug 53866 - Please add OSGI information to the MANIFEST.MF
Summary: Please add OSGI information to the MANIFEST.MF
Status: RESOLVED DUPLICATE of bug 57857
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.8-FINAL
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-13 12:52 UTC by Sebastien Arod
Modified: 2015-08-20 19:27 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Arod 2012-09-13 12:52:35 UTC
Please add OSGI metadata to the MANIFEST.MF of POI jars so that they can be used directly in an OSGI runtime
Comment 1 Nick Burch 2012-09-13 13:28:12 UTC
I'm not sure we have any OSGi experts in the project. Could you please suggest what we should be adding, and how we can test it's working?
Comment 2 pascal leclercq 2012-10-11 21:09:41 UTC
It should be fairly easy bing using bnd (or maven-bundle-plugin if you use maven).

see :
http://www.aqute.biz/Code/Bnd


The problem I see here is you have the same package into different jars for example : "org.apache.poi" into poi-ooxml.jar and poi.jar.

This doesn't behave well under OSGi.


Let me know if I can help....
Comment 3 Nick Burch 2012-10-11 21:27:38 UTC
Would we be better therefore to produce one "POI OSGi" jar that contains the contents of all the others rolled into it?

If you'd like to come up with a patch that uses a tool like bnd to wrap it up, we can certainly look at adding that to the build process. However, I'm not sure we have any OSGi experts on the project, so someone who's interested in seeing OSGi support will need to do the bulk of the work!
Comment 4 Sebastien Arod 2014-06-15 16:37:00 UTC
Apache servicemix is publishing an osgified version of POI but they are generally one or two versions behind latest poi version.

They build one single "poi-osgi" bundle that include poi, poi-contrib, poi-ooxml, and poi-scratchpad. It seems to confirm Pascal comment's.

The maven pom.xml they used to build version 3.9 is available at http://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/poi-3.9
They use shade to build a single jar and bnd to generate the osgi manifest.

The problem is that poi build uses ant for the build and not maven however I think it should be possible to use bnd from ant.
Comment 5 Nick Burch 2014-06-16 11:16:53 UTC
I've made a quick start in r1602846, but I don't know enough about the bnd tool to know what options / parameters are needed to make it do the right thing

If someone who knows more OSGi fancies having a go at finishing that off, please attach a patch!
Comment 6 Dominik Stadler 2015-08-20 19:27:54 UTC
There is some more discussion of this in bug 57857 with newer patches and more information of what is still missing so I am going to duplicate this one.

*** This bug has been marked as a duplicate of bug 57857 ***