Description
Expected behavior
When deploying in OSGi containers the Jedis bundle has two hard requirements on having the GSON and JSON bundles around. With #3223 and #3249 the dependencies were made optional at runtime (to my understanding).
Additionally, due to an unfortunate interaction between the way the org.json:json bundle does versioning and OSGi metadata requirements OSGi consumers must use the same version as declared in the pom.xml dependencies.
The error messages look something like this.
For missing OSGi bundles
[ERROR] [bundle-packages] redis.clients:jedis:5.1.5: Bundle is importing package org.json with start order 24 but no bundle is exporting these for that start order.
[ERROR] [bundle-packages] redis.clients:jedis:5.1.5: Bundle is importing package com.google.gson;version=[2.10,3) with start order 24 but no bundle is exporting these for that start order in the required version range.
For a version of the org.json:json bundle that is too new
[ERROR] [bundle-packages] redis.clients:jedis:5.1.5: Bundle is importing package org.json;version=[20231013.0,20231014) with start order 24 but no bundle is exporting these for that start order in the required version range.
Actual behavior
The Jedis bundle should resolve in OSGi containers without the JSON and GSON bundlles for deployers who don't use JSON functionality.
The Jedis bundle should resolve in OSGi container with versions of the JSON bundle more recent than the one used in the Jedis pom.xml.
Steps to reproduce:
Please create a reproducible case of your problem. Make sure
that case repeats consistently and it's not random
- Deploy the Jedis bundle in an OSGi container without any JSON libraries
Redis / Jedis Configuration
Jedis version:
5.1.5
Redis version:
N/A, did not get so far.
Java version:
openjdk 21.0.4 2024-07-16