GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update jakarta.xml.bind-api to 3.0+ · Issue #313 · xmlunit/xmlunit

Update jakarta.xml.bind-api to 3.0+ #313

New issue
Copy link
New issue
Copy link
Closed
Closed
Update jakarta.xml.bind-api to 3.0+#313
Copy link
Labels
enhancementjakarta-jaxb supportquestion
Milestone
2.11.0

Description

@pigelvy
pigelvy
opened on Oct 17, 2025
Issue body actions

Hi,

XMLUnit is currently using the jakarta.xml.bind:jakarta.xml.bind-api r2.3.3, which uses the legacy package javax.xml.bind.

Since Jakarta XML Binding 3.0, the package was changed to jakarta.xml.bind.

I think it's time to get away from the old javax.* world and embrace the new jakarta.* one. Several other projects have already migrated and because Maven groupId/artifactId have not changed, we can't use both at the same time.

IMO, it would be a step forward to update this API.

It would also be a step forward to update Java to 11+. It's about time to move on and let Java 8 go.

Regards

Activity

  1. bodewig commented on Oct 17, 2025

    @bodewig
    bodewig
    on Oct 17, 2025
    Member
    More actions

    org.xmlunit:xmlunit-jakarta-jaxb-impl depends on 3.0.1 and is what you need to add as a dependency. See https://github.com/xmlunit/user-guide/wiki/JAXB#i-want-to-use-jakartaxmlbind

  2. bodewig
    closed this as completedon Oct 17, 2025
  3. bodewig
    added
    question
    on Oct 17, 2025
  4. pigelvy commented on Oct 17, 2025

    @pigelvy
    pigelvy
    on Oct 17, 2025
    Author
    More actions

    Thanks for the info.

    One remark though... Is it normal for org.xmlunit:xmlunit-jakarta-jaxb-impl to depend on the JAXB implementation
    org.glassfish.jaxb:jaxb-runtime in scope compile?

    It forces the users to use it, or to explicitly exclude it.

  5. bodewig
    reopened this on Oct 17, 2025
  6. bodewig commented on Oct 17, 2025

    @bodewig
    bodewig
    on Oct 17, 2025
    Member
    More actions

    Hmm, at least for XMLUnit itself it would be enough to use the compile test scope.

    The alternative is that everybody is forced to explicitly specify an implementation, isn't it? If we changed it, the next release would break things for the existing users of xmlunit-jakarta-jaxb-impl who rely on the transitive dependency.

  7. bodewig
    added
    jakarta-jaxb support
    on Oct 17, 2025
  8. pigelvy commented on Oct 20, 2025

    @pigelvy
    pigelvy
    on Oct 20, 2025
    Author
    More actions

    Indeed, changing the scope of the dependency would introduce a breaking change. However, it is a small breaking change that is easy to justify, document and fix.

    Furthermore, working with an API and being agnostic of the runtime implementation is the whole point of an API.
    All the Jakarta specifications seem to work that way. People must already know about that...

  9. bodewig
    added
    enhancement
    on Oct 20, 2025
  10. bodewig
    added this to the 2.11.0 milestone on Oct 20, 2025
  11. bodewig
    added 2 commits that reference this issue on Oct 20, 2025

    remove gard dependency on glassfish's JAXB implementation

    6ddc63f

    remove hard dependency on glassfish's JAXB implementation

    0500c61
  12. bodewig commented on Oct 20, 2025

    @bodewig
    bodewig
    on Oct 20, 2025
    Member
    More actions

    Basically I've been verifying my understanding, thanks.

    Note that I personally don't use JAXB (neither version) so really only perform the basic testing provided by the unit tests.

  13. bodewig
    closed this as completedon Oct 20, 2025
  14. bodewig commented on Oct 20, 2025

    @bodewig
    bodewig
    on Oct 20, 2025
    Member
    More actions

    I'm in the process of publishing 2.11.0-SNAPSHOT builds.

  15. pigelvy commented on Oct 21, 2025

    @pigelvy
    pigelvy
    on Oct 21, 2025
    Author
    More actions

    Very nice improvement IMO. Makes XMLUnit cleaner. And for those who'll be impacted, it'll force them to read a little about the JAXB spec and clarify their own dependency management.

    I've been looking at your unit tests in xmlunit-jakarta-jaxb-impl and, even though we can always do better, the few tests present use the API and leverage an implementation to assert that the JAXB system works.

    It is not the role of XMLUnit to test JAXB thoroughly.

    Nice work! I'm looking forward to the releasing of v2.11.0.

  16. bodewig commented on Oct 24, 2025

    @bodewig
    bodewig
    on Oct 24, 2025
    Member
    More actions

    I've just publish the release.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementjakarta-jaxb supportquestion

    Type

    No type

    Projects

    No projects

      Milestone

      • 2.11.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.