Junfeic / kryo

Automatically exported from code.google.com/p/kryo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add OSGi bundle headers #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by rocketra...@gmail.com on 31 Oct 2012 at 9:55

Attachments:

GoogleCodeExporter commented 9 years ago
Martin, can you handle this one? I wouldn't want to mess around with all your 
pointy brackets. ;)

Original comment by nathan.s...@gmail.com on 4 Dec 2012 at 12:31

GoogleCodeExporter commented 9 years ago
@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?

Original comment by martin.grotzke on 4 Dec 2012 at 8:13

GoogleCodeExporter commented 9 years ago
Martin, 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...

Original comment by rocketra...@gmail.com on 4 Dec 2012 at 3:00

GoogleCodeExporter commented 9 years ago
Thanx for the explanation, the patch is applied.

Original comment by martin.grotzke on 4 Dec 2012 at 10:17

GoogleCodeExporter commented 9 years ago
what version of kryo includes the OSGI headers?

Original comment by zsol...@gmail.com on 15 Oct 2013 at 2:55

GoogleCodeExporter commented 9 years ago
Every 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

Original comment by martin.grotzke on 15 Oct 2013 at 6:31