fusesource / leveldbjni

A Java Native Interface to LevelDB
BSD 3-Clause "New" or "Revised" License
536 stars 143 forks source link

Add OSGi meta-data to the jar #19

Closed rocketraman closed 11 years ago

rocketraman commented 11 years ago

I would like to use leveldbjni in an OSGi environment. I was able to add the OSGi meta-data to a pre-built leveldbjni jar and make it work correctly. However, it would be great if this could be applied upstream. I would have applied it directly here, but the build is a little different than most java projects because of the native code, so I wasn't sure how to correctly modify the build for this.

I did, however, create a servicemix-bundle that adds the meta-data after the fact. It is likely the logic there can be used directly on the upstream project, without the shade part:

https://github.com/vivosys/servicemix4-bundles/commit/8857fc4689bc2480c5cde6c1db98be539ad9ba01

If this can be added in the project, then I won't bother submitting the servicemix patch as it will be obsolete.

fordguo commented 11 years ago

It's cool,but it does not work on mac os. I give the processor attribute,worked! META-INF/native/osx/libleveldbjni.jnilib;osname=macosx;processor=x86-64

chirino commented 11 years ago

Thanks, next release should have that fixed.