FasterXML / jackson-modules-base

Uber-project for foundational modules of Jackson that build directly on core components but nothing else; not including data format or datatype modules
Apache License 2.0
167 stars 77 forks source link

Missed change of `javax.activation;resolution:=optional` to `jakarta.activation;resolution:=optional` in `jakarta-xmlbind/pom.xml` #231

Closed sammyhk closed 10 months ago

sammyhk commented 10 months ago

As title, maybe also need to change javax.activation;resolution:=optional to jakarta.activation;resolution:=optional in https://github.com/FasterXML/jackson-modules-base/blob/2024cb7673c10a5efcad05aa17a154c1dd2fc188/jakarta-xmlbind/pom.xml#L40

cowtowncoder commented 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.

cowtowncoder commented 10 months ago

@sammyhk Do you observe an issue when running on OSGi container, or is this just based on it looking wrong (which it does :) )?

sammyhk commented 10 months ago

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.