It would be great if the Kryo build would add OSGi bundle headers to the jar. This would allow people to use Kryo in their OSGi applications.
Adding the OSGi headers to the manifest does not cause any issues for non-OSGi applications.
I have attached a patch.
- osgi-build.patch 1.13KB
Comment #1
Posted on Dec 4, 2012 by Grumpy CamelMartin, can you handle this one? I wouldn't want to mess around with all your pointy brackets. ;)
Comment #2
Posted on Dec 4, 2012 by Grumpy Bear@rocketraman: why are the Import-Packages for COM.jrockit*, COM.newmonics*, jrockit* and sun.reflect needed? For my understanding (I never used osgi): why must the packaging be changed from jar to bundle?
Comment #3
Posted on Dec 4, 2012 by Happy WombatMartin, the COM.jrocket and other imports are explicitly listed so that the qualifier "resolution:=optional" can be added to each one. The default behavior is to require those imports, which is not correct since they are environment specific.
Changing the packaging from jar to bundle is the easiest way to get the maven-bundle-plugin to execute at the appropriate lifecycle stages during the build. If that bothers you, we can add some explicit logic to the maven build to do that. See "Adding OSGi metadata to existing projects without changing the packaging type" at this page:
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
If you prefer that approach, I can update the patch...
Comment #4
Posted on Dec 4, 2012 by Grumpy BearThanx for the explanation, the patch is applied.
Comment #5
Posted on Oct 15, 2013 by Swift Birdwhat version of kryo includes the OSGI headers?
Comment #6
Posted on Oct 15, 2013 by Grumpy BearEvery version released after dec. 6 2012 should come with osgi manifest headers. With 2.22 the kryo jar is built as shaded jar (includes all dependencies), perhaps this introduced issues. See also #117
Status: Fixed
Labels:
Type-Enhancement
Priority-Medium