From e4d5aa4447991b344ae4de4cea71caf6216ef255 Mon Sep 17 00:00:00 2001 From: Robert Munteanu Date: Fri, 27 Sep 2024 14:43:19 +0200 Subject: [PATCH] Make JSON imports optional in OSGi environments When deploying in OSGi containers the Jedis bundle has two hard requirements on having the GSON and JSON bundles around. Since these depenendencies are optional we mark the imports as such in the OSGi manifest. If these packages are not exported the bundle will be installed and will be unable to make use of the JSON functionality. When they are present they will be used. Additionally, allow newer version of the org.json bundle to be used without requiring a new release of Jedis. --- pom.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pom.xml b/pom.xml index 548fe1ca23..f929411de1 100644 --- a/pom.xml +++ b/pom.xml @@ -292,6 +292,19 @@ org.apache.felix maven-bundle-plugin 5.1.9 + + + + + com.google.gson;resolution:=optional, + org.json;resolution:=optional;version="20240303.0", + * + + + bundle-manifest