RuddenberryL / json-path

Automatically exported from code.google.com/p/json-path
0 stars 0 forks source link

JsonPath 1.2.0 - OSGi imports should be optional #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

Just upgrading to latest 1.2.0 release for OSGi and noticed that it now 
requires both jackson and google gson on the classpath as they are imported. 

In the MANIFEST.MF of the 1.2.0 release we have

Import-Package: com.fasterxml.jackson.core;version="[2.3,3)",com.faste
 rxml.jackson.databind;version="[2.3,3)",com.fasterxml.jackson.databin
 d.node;version="[2.3,3)",com.fasterxml.jackson.databind.type;version=
 "[2.3,3)",com.google.gson;version="[2.3,3)",com.google.gson.internal;
 version="[2.3,3)",com.google.gson.reflect;version="[2.3,3)",net.minid
 ev.json;version="[2.1,3)",net.minidev.json.parser;version="[2.1,3)",n
 et.minidev.json.writer,org.slf4j;version="[1.7,2)"

As Jackson and Google Gson are optional, then the imports above should declare 
that, eg adding ;resolution:=optional

Import-Package: 
com.fasterxml.jackson.core;version="[2.3,3)";resolution:=optional,com.faste
 rxml.jackson.databind;version="[2.3,3)";resolution:=optional,com.fasterxml.jackson.databin
 d.node;version="[2.3,3)";resolution:=optional,com.fasterxml.jackson.databind.type;version=
 "[2.3,3)";resolution:=optional,com.google.gson;version="[2.3,3)";resolution:=optional,com.google.gson.internal;
 version="[2.3,3)";resolution:=optional,com.google.gson.reflect;version="[2.3,3)";resolution:=optional,net.minid
 ev.json;version="[2.1,3)",net.minidev.json.parser;version="[2.1,3)",n
 et.minidev.json.writer,org.slf4j;version="[1.7,2)"

Original issue reported on code.google.com by claus.ib...@gmail.com on 30 Jan 2015 at 5:21

GoogleCodeExporter commented 9 years ago
Ah darn then json-smart do not export its writer package which json-path 
requires, so we get this error now, after adding jackson and gson

ERROR: Bundle org.apache.camel.camel-jsonpath [95] Error starting/stopping 
bundle. (org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.camel.camel-jsonpath [95]: Unable to resolve 95.0: missing 
requirement [95.0] osgi.wiring.package; 
(&(osgi.wiring.package=com.jayway.jsonpath)(version>=1.2.0)(!(version>=2.0.0))) 
[caused by: Unable to resolve 88.0: missing requirement [88.0] 
osgi.wiring.package; (osgi.wiring.package=net.minidev.json.writer)])
org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.camel.camel-jsonpath [95]: Unable to resolve 95.0: missing 
requirement [95.0] osgi.wiring.package; 
(&(osgi.wiring.package=com.jayway.jsonpath)(version>=1.2.0)(!(version>=2.0.0))) 
[caused by: Unable to resolve 88.0: missing requirement [88.0] 
osgi.wiring.package; (osgi.wiring.package=net.minidev.json.writer)]

OSGi is just marvelous :(

Original comment by claus.ib...@gmail.com on 30 Jan 2015 at 5:29

GoogleCodeExporter commented 9 years ago
Ah yay json-smart 2.1.1 has fixed this. Maybe upgrade to use that version as 
well by json-path.

Original comment by claus.ib...@gmail.com on 30 Jan 2015 at 5:36

GoogleCodeExporter commented 9 years ago
I'm aware of this issue and I will try to address it ASAP.

Original comment by kalle.st...@gmail.com on 30 Jan 2015 at 11:40