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

Defect wrt guava OSGi dependency version specified #160

Closed
jpstotz opened this issue Sep 6, 2024 · 3 comments
Closed

Defect wrt guava OSGi dependency version specified #160

jpstotz opened this issue Sep 6, 2024 · 3 comments
Assignees

Comments

@jpstotz
Copy link

jpstotz commented Sep 6, 2024

The MANIFEST.MF of com.fasterxml.jackson.datatype:jackson-datatype-guava:2.17.2 defines as dependency for example:

com.google.common.base;version="[25.1.0.jre0,99)"

This means the minimum version is 25.1.0.jre0 and the maximum version 99.
The problem is that guava has no version 25.1.0.jre0 only maven version 25.1-jre (which has the OSGI version 25.1.0.jre) .
Therefore the whole library can not be used in an OSGi environment as it is impossible to satisfy it's version requirements.

@cowtowncoder cowtowncoder changed the title guava: defect guava OSGi dependency version specified? Defect guava OSGi dependency version specified? Sep 9, 2024
@cowtowncoder cowtowncoder self-assigned this Sep 9, 2024
@cowtowncoder
Copy link
Member

@jpstotz I created #161 for attempting to fix the issue -- I think the earlier logic must have worked with earlier Guava versions (23 and under) before -jre suffix.
But I have no good way to verify the fix so was hoping you could help see if my change works: I can build locally, and see what things look like, but ultimately it'd be great if someone else could validate this.

@jpstotz
Copy link
Author

jpstotz commented Sep 10, 2024

Based on your PR the OSGi version range will end up as [25.1, 99). I am not sure if this will work (and testing is indeed not that easy).

jackson-datatype-guava defines these imports in it's MANIFEST.MF (Import-Package: ):

  • com.google.common.base
  • com.google.common.cache
  • com.google.common.collect
  • com.google.common.hash
  • com.google.common.net

Looking at MANIFEST.MF of guava-25.1-jre we see it exports (Export-Package):

  • com.google.common.annotations;version="25.1.0"
  • com.google.common.base;version="25.1.0"
  • com.google.common.cache;version="25.1.0"
  • com.google.common.collect;version="25.1.0"
  • com.google.common.hash;version="25.1.0"
  • com.google.common.net;version="25.1.0"

Therefore I would also use this exact version string 25.1.0 and just to be sure I would remove the space before 99.

@cowtowncoder
Copy link
Member

I can change the version ref to, say, 25.1.0. But using a single version instead of range seems problematic as most users would want to use something much more recent than 25.x -- the whole idea is that module should support a wide range of versions.

@cowtowncoder cowtowncoder changed the title Defect guava OSGi dependency version specified? Defect wrt guava OSGi dependency version specified Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants