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

jnr-unixsocket v0.23 and above forces osgi.ee;filter:="(&(osgi.e e=JavaSE)(version=9.0))" #77

Open
nvatvani opened this issue Oct 31, 2019 · 3 comments
Milestone

Comments

@nvatvani
Copy link

When using JDK1.8, jnr-unixsocket v0.22 and below correctly sets osgi.ee;filter:="(&(osgi.e e=JavaSE)(version=1.8))" but v0.23 and above forces osgi.ee;filter:="(&(osgi.e e=JavaSE)(version=9.0))".

Given that JDK1.8 is still supported, can jnr-unixsocket v0.25-SNAPSHOT have its dependencies adjusted so that osgi.ee;filter:="(&(osgi.e e=JavaSE)(version=1.8))" persists and one is not forced to upgrade to JDK9?

The dependency involved that forces osgi.ee;filter:="(&(osgi.e e=JavaSE)(version=9.0))" is described here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=537751

.. specifically "org.objectweb.asm" which is a transitive dependency of jnr-enxio.

It is "org.objectweb.asm" that forces JDK9.

@headius
Copy link
Member

headius commented Jan 9, 2020

Hmm...so how do I fix this?

@nvatvani
Copy link
Author

nvatvani commented Jan 10, 2020

Hmm...so how do I fix this?

You hack it by specifying <_noee>true</_noee> under instruction tag of the maven-bundle-plugin

The _noee tag removes all minimum versioning enforcement of the runtime JRE.

@headius headius added this to the 0.26 milestone Jan 10, 2020
@headius
Copy link
Member

headius commented Jan 10, 2020

Ok I tried this patch but I did not see any difference in the MANIFEST. I also did not see any Require-Capability in the MANIFEST before I made the change, so I'm confused about how to proceed.

diff --git a/pom.xml b/pom.xml
index f5070ff..6bf0e1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -179,6 +179,7 @@
         <configuration>
           <instructions>
             <_nouses>true</_nouses>
+            <_noee>true</_noee>
             <Import-Package>*,jnr.ffi.mapper,jnr.ffi.provider.converters,jnr.ffi.provider.jffi,com.kenai.jffi</Import-Package>
             <Automatic-Module-Name>jnr.unixsocket</Automatic-Module-Name>
           </instructions>

Unpatched MANIFEST.MF:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven Bundle Plugin
Built-By: headius
Build-Jdk: 1.8.0_222
Automatic-Module-Name: jnr.unixsocket
Bnd-LastModified: 1578673603363
Bundle-Description: Native I/O access for java
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion: 2
Bundle-Name: jnr-unixsocket
Bundle-SymbolicName: com.github.jnr.unixsocket
Bundle-Version: 0.26.0.SNAPSHOT
Export-Package: jnr.unixsocket;version="0.26.0.SNAPSHOT"
Import-Package: com.kenai.jffi,jnr.constants.platform;version="[0.9,1)
 ",jnr.enxio.channels;version="[0.23,1)",jnr.ffi;version="[2.1,3)",jnr
 .ffi.annotations;version="[2.1,3)",jnr.ffi.byref;version="[2.1,3)",jn
 r.ffi.mapper;version="[2.1,3)",jnr.ffi.provider.converters;version="[
 2.1,3)",jnr.ffi.provider.jffi;version="[2.1,3)",jnr.ffi.types;version
 ="[2.1,3)",jnr.posix;version="[3.0,4)"
Tool: Bnd-1.50.0

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

No branches or pull requests

2 participants