Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSGi metadata to jnr-ffi. #45

Merged
merged 1 commit into from Sep 3, 2015
Merged

Add OSGi metadata to jnr-ffi. #45

merged 1 commit into from Sep 3, 2015

Conversation

rgrunber
Copy link
Contributor

Use maven-bundle-plugin to generate OSGi metadata and include the
manifest using maven-jar-plugin.

This change only adds additional entries to the MANIFEST.MF shipped in the final jar artifact. The attributes would not affect current consumers of this artifact.

Use maven-bundle-plugin to generate OSGi metadata and include the
manifest using maven-jar-plugin.
headius added a commit that referenced this pull request Sep 3, 2015
Add OSGi metadata to jnr-ffi.
@headius headius merged commit 46abf34 into jnr:master Sep 3, 2015
@headius headius added this to the 2.0.4 milestone Oct 23, 2015
@tolbertam
Copy link

Has anyone gotten this to work? I'm having problems because jnr-ffi imports com.kenai.jffi (coming from the jffi library) which lacks bundle metadata:

ERROR: Bundle com.datastax.driver.core [13] Error starting reference:file:../../driver-core/target/cassandra-driver-core-2.1.10-SNAPSHOT-shaded.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle com.datastax.driver.core [13]: Unable to resolve 13.0: missing requirement [13.0] osgi.wiring.package; (&(osgi.wiring.package=jnr.ffi)(version>=2.0.0)(!(version>=3.0.0))) [caused by: Unable to resolve 19.0: missing requirement [19.0] osgi.wiring.package; (osgi.wiring.package=com.kenai.jffi)])
org.osgi.framework.BundleException: Unresolved constraint in bundle com.datastax.driver.core [13]: Unable to resolve 13.0: missing requirement [13.0] osgi.wiring.package; (&(osgi.wiring.package=jnr.ffi)(version>=2.0.0)(!(version>=3.0.0))) [caused by: Unable to resolve 19.0: missing requirement [19.0] osgi.wiring.package; (osgi.wiring.package=com.kenai.jffi)]
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4097)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2114)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1368)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
    at java.lang.Thread.run(Thread.java:745)

@tolbertam
Copy link

I see, both redhat and debian provide packages for jffi-native that are proper OSGI bundles so granted you use the jars provided by those packages it should work.

@tolbertam
Copy link

I created a pull request (jnr/jffi#29) for providing OSGi metadata for jffi/jffi-native as part of the build process. Confirmed that I can use jnr-ffi in OSGi 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants