Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bodewig
Copy link
Member

@bodewig bodewig commented Jan 12, 2022

This is an attempt to allow the Jakarta JAXB implementation to be used by adding a new xmlunit-jakarta-jaxb-impl dependency. At least it passes my rudimentary tests (I don't use either version of JAXB myself in any real project).

It currently lacks documentation, something I should be able to fix the coming weekend.

  • if you want Jakarta JAXB then add the new dependency and explicitly configure the version of jaxb-runtime and jakarta.xml.bind-api.
  • if you want the old JAXB API you don't need to change anything if you use the default Marshaller

It introduces (at least) one breaking change. If you want to invoke withMarshaller you must explicitly cast the JaxbBuilder.

see #227

/cc @michael-schnell @phbenisc @Joerg-Schoemer

@bodewig
Copy link
Member Author

bodewig commented Jan 13, 2022

I've just added withMarshaller back to JaxbBuilder so the change should now be source-compatible with 2.8.4. It is not binary compatible as the method signature has changed, but having to re-compile is better than being forced to explicitly cast to the expected JaxbBuilder subclass (in addition to re-compiling, that is).

@Joerg-Schoemer
Copy link

this is a very good approach to deal with the namespace trouble, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants