This is a helper library to enable using the earlier JAXB stack (where the API is using the package javax.xml.bind) together with the newer Jakarta-br

digipost/jaxb-resolver-com.sun.xml.bind

submited by
Style Pass
2023-03-21 22:30:09

This is a helper library to enable using the earlier JAXB stack (where the API is using the package javax.xml.bind) together with the newer Jakarta-branded JAXB versions.

jaxb-resolver-com.sun.xml.bind sets up JAXB discovery for javax.xml.bind to resolve to the com.sun.xml.bind implementation, and the BOM also ensures dependencies to the old non-Jakarta JAXB API and commonly used reference implementation, i.e:

The JAXB-dependencies are carefully chosen so that no Jakarta-branded dependencies are included, which means that anyone depending on this library are free to also depend on and resolve JAXBContexts using the newer Jakarta-branded dependencies, and the two variants should not interfere with each other.

Whenever an invocation happens to JAXBContext.newInstance(..), you should see an INFO-message logged to the no.digipost.jaxb.context.OldJaxb2ContextFactory logger with information about the created JAXB context, which should be com.sun.xml.bind.v2.runtime.JAXBContextImpl, and the classes bound to the context.

Leave a Comment