Description
After adding OSGi metadata to zookeeper.jar it can be used as both an OSGi bundle as well as an ordinary jar file.
In the CXF/DOSGi project the buildsystem does this using the maven-bundle-plugin: http://svn.apache.org/repos/asf/cxf/dosgi/trunk/discovery/distributed/zookeeper-wrapper/pom.xml
The MANIFEST.MF generated by maven-bundle-plugin is attached to this bug, this works for the CXF/DOSGi project.
If your buildsystem isn't using maven, I would advise to use bnd (http://www.aqute.biz/Code/Bnd). BND defines its own ant task in which you should be able to use more or less the same instructions as were used in maven:
<instructions>
<Bundle-Name>ZooKeeper bundle</Bundle-Name>
<Bundle-Description>This bundle contains the ZooKeeper library</Bundle-Description>
<Bundle-SymbolicName>org.apache.hadoop.zookeeper</Bundle-SymbolicName>
<Bundle-Version>3.1.1</Bundle-Version>
<Import-Package>*</Import-Package>
<Export-Package>*;version=3.1.1</Export-Package>
</instructions>
Oh and one other thing. Is it really necessary to put the source code in the Jar file too? I would put that in a separate source distribution
Attachments
Attachments
Issue Links
- is depended upon by
-
ZOOKEEPER-584 ZooKeeper service instance should be registered in the OSGi registry
- Open
- relates to
-
ZOOKEEPER-749 OSGi metadata not included in binary only jar
- Closed