Closed sammyhk closed 10 months ago
This looks it should be made, yes. But was hoping someone could confirm this is what is needed; I don't know how to double-check and the whole JAXB-vs-Jakarta change has been quite messy.
And if so, should this change be done for 2.16.1 (patch) or wait until 2.17.0.
@sammyhk Do you observe an issue when running on OSGi container, or is this just based on it looking wrong (which it does :) )?
I think that statement is to mark that dependency optional, actually currently generated MANIFEST.MF (in 2.14.1) is following:
Import-Package: com.fasterxml.jackson.annotation;version="[2.14,3)",co
m.fasterxml.jackson.core;version="[2.14,3)",com.fasterxml.jackson.cor
e.util;version="[2.14,3)",com.fasterxml.jackson.databind;version="[2.
14,3)",com.fasterxml.jackson.databind.cfg;version="[2.14,3)",com.fast
erxml.jackson.databind.deser.std;version="[2.14,3)",com.fasterxml.jac
kson.databind.introspect;version="[2.14,3)",com.fasterxml.jackson.dat
abind.jsonFormatVisitors;version="[2.14,3)",com.fasterxml.jackson.dat
abind.jsontype;version="[2.14,3)",com.fasterxml.jackson.databind.json
type.impl;version="[2.14,3)",com.fasterxml.jackson.databind.node;vers
ion="[2.14,3)",com.fasterxml.jackson.databind.ser.std;version="[2.14,
3)",com.fasterxml.jackson.databind.type;version="[2.14,3)",com.faster
xml.jackson.databind.util;version="[2.14,3)",com.fasterxml.jackson.mo
dule.jakarta.xmlbind.deser;version="[2.14,3)",com.fasterxml.jackson.m
odule.jakarta.xmlbind.ser;version="[2.14,3)",jakarta.activation;versi
on="[2.0,3)",jakarta.xml.bind;version="[3.0,4)",jakarta.xml.bind.anno
tation;version="[3.0,4)",jakarta.xml.bind.annotation.adapters;version
="[3.0,4)",javax.activation;resolution:=optional
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Export-Package: com.fasterxml.jackson.module.jakarta.xmlbind;version="
2.14.1";uses:="com.fasterxml.jackson.annotation,com.fasterxml.jackson
.core,com.fasterxml.jackson.databind,com.fasterxml.jackson.databind.c
fg,com.fasterxml.jackson.databind.introspect,com.fasterxml.jackson.da
tabind.jsontype,com.fasterxml.jackson.databind.type,com.fasterxml.jac
kson.databind.util,jakarta.xml.bind.annotation,jakarta.xml.bind.annot
ation.adapters",com.fasterxml.jackson.module.jakarta.xmlbind.deser;ve
rsion="2.14.1";uses:="com.fasterxml.jackson.core,com.fasterxml.jackso
n.databind,com.fasterxml.jackson.databind.deser.std,jakarta.activatio
n",com.fasterxml.jackson.module.jakarta.xmlbind.ser;version="2.14.1";
uses:="com.fasterxml.jackson.core,com.fasterxml.jackson.databind,com.
fasterxml.jackson.databind.jsonFormatVisitors,com.fasterxml.jackson.d
atabind.ser.std,jakarta.activation"
It is already marked to require jakarta.activation
(jakarta.activation;version="[2.0,3)"
), what it missing compared with the old jar is if jakarta.activation is missing it will throw exception instead of do nothing.
For me, I haven't checked on OSGI container, but believe the behavior should be above.
As title, maybe also need to change
javax.activation;resolution:=optional
tojakarta.activation;resolution:=optional
in https://github.com/FasterXML/jackson-modules-base/blob/2024cb7673c10a5efcad05aa17a154c1dd2fc188/jakarta-xmlbind/pom.xml#L40