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 — jakarta.xml.bind-api in xmlunit-core isn't optional, unlike the OSGi import fixed in #301 · Issue #339 · xmlunit/xmlunit

jakarta.xml.bind-api in xmlunit-core isn't optional, unlike the OSGi import fixed in #301 #339

New issue
Copy link
New issue
Copy link
Closed
#340
Closed
jakarta.xml.bind-api in xmlunit-core isn't optional, unlike the OSGi import fixed in #301#339
#340
Copy link
Milestone
2.14.0

Description

@vivainio
vivainio
opened on Sep 9, 2026
Issue body actions

xmlunit-core's pom.xml declares jakarta.xml.bind-api (currently pinned to 2.3.3, the last version still using the javax.xml.bind package) as a plain compile dependency. Only jaxb-runtime next to it has <optional>true</optional>.

This means any project that (a) depends on xmlunit-core directly and (b) also needs a real jakarta.xml.bind implementation elsewhere (e.g. via jaxb-runtime 4.x for something unrelated to xmlunit) can end up with 2.3.3 winning Maven's "nearest wins" mediation, since it's a direct dependency's transitive. That silently breaks anything using the real JAXB dependency at runtime with a ClassNotFoundException, since 2.3.3 doesn't even have the jakarta.xml.bind package.

Example from a build that only uses xmlunit for DiffBuilder (never touches Input.from(jaxbBean)):

+- org.xmlunit:xmlunit-core:jar:2.13.0:compile
|  \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
+- org.glassfish.jaxb:jaxb-runtime:jar:4.0.5:compile
|     +- (jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.2:compile - omitted for conflict with 2.3.3)

#301 made the javax.xml.bind OSGi manifest import optional, but that's Import-Package metadata and doesn't affect plain Maven/Gradle resolution — the pom dependency itself is still mandatory. Marking it <optional>true</optional> in the pom (same as jaxb-runtime already is) seems like it would fix this the same way #301 fixed it for OSGi, without touching the javax/jakarta namespace question from #313.

Worked around it on our end with an exclusion, just flagging it in case it's a quick fix like #301 was.

Activity

  1. arimu1
    added a commit that references this issue on Sep 12, 2026

    Mark jakarta.xml.bind-api optional in xmlunit-core (xmlunit#339)

    00e4ba3
  2. bodewig
    closed this as completedin #340on Sep 16, 2026
  3. bodewig commented on Sep 16, 2026

    @bodewig
    bodewig
    on Sep 16, 2026
    Member
    More actions

    yes, it looks as if marking the dependency optional didn't do any hard (I thought it would). I'll cut a new release the coming days.

    Reacted by Ville Vainio
  4. bodewig
    added this to the 2.14.0 milestone on Sep 18, 2026
  5. bodewig commented on Sep 18, 2026

    @bodewig
    bodewig
    on Sep 18, 2026
    Member
    More actions

    2.14.0 has been released and has reached Maven Central by now.

    Reacted by Ville Vainio
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • 2.14.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.