FasterXML / jackson-jakarta-rs-providers

Multi-module project that contains Jackson-based "new" Jakarta-RS (nee "JAX-RS" -- ones under `jakarta.ws.rs`) providers for JSON, XML, YAML, Smile, CBOR formats
Apache License 2.0
14 stars 11 forks source link

Module com.fasterxml.jackson.jakarta.rs.json requires com.fasterxml.jackson.module.jakarta.xmlbind #13

Open agavrilov76 opened 1 year ago

agavrilov76 commented 1 year ago

The Java module com.fasterxml.jackson.jakarta.rs.json explicitly requires com.fasterxml.jackson.module.jakarta.xmlbind without real need (AFAIK). It makes it impossible to use the JSON provider module without JAXB annotations when running with Java Modules

cowtowncoder commented 1 year ago

This is true, but unfortunately not something that can be changed in Jackson 2.x. The issue is that due to some users' use of JAXB annotations for JSON, there is configurability in provider class that allows simple registration of one or both of:

  1. Default JacksonAnnotationIntrospector
  2. JAXB-annotation based introspector

and thus there is a hard dependency, even if you do not use JAXB-backed introspector.

This will be removed from Jackson 3.0 but unfortunately it has to stay in 2.x.

agavrilov76 commented 1 year ago

Alright, no problem.

For my use case we will make sure the JAXB module is not loaded to make sure the JAXB annotations are ignored. Looking forward to Jackson 3.0 :)

cowtowncoder commented 1 year ago

Yeah. 3.0 has been a rather... long-term project, alas. Always things that can still be done with 2.x :)

But this is definitely one of those things I am looking forward to resolve.