Skip to content

Mark jakarta.xml.bind-api optional in xmlunit-core - #340

Merged
bodewig merged 1 commit into
xmlunit:mainfrom
arimu1:fix/339-optional-jakarta-bind-api
Sep 16, 2026
Merged

bodewig merged 1 commit into
xmlunit:mainfrom
arimu1:fix/339-optional-jakarta-bind-api

Conversation

@arimu1

@arimu1 arimu1 commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Mark jakarta.xml.bind-api as <optional>true</optional> in the java9+ profile of xmlunit-core, matching jaxb-runtime and the optional OSGi Import-Package for JAXB from make javax.xml.bind.* OSGi imports optional #301.
  • Fixes Maven/Gradle consumers being forced to resolve bind-api 2.3.3 transitively when they only use non-JAXB APIs (e.g. DiffBuilder), which can break mediation when another part of the build needs a newer Jakarta JAXB API.

Fixes #339

Test plan

  • JAVA_HOME=…/Temurin-21 mvn clean test -pl xmlunit-core -am (passes)
  • JAXB-related modules and compat tests still declare bind-api explicitly where needed; xmlunit-core’s own compile/test classpath is unchanged because optional dependencies remain on the declaring module’s classpath.

Align Maven dependency optionality with the optional OSGi JAXB import from xmlunit#301 so consumers are not forced to resolve bind-api 2.3.3 when they only use non-JAXB APIs.
@arimu1
arimu1 force-pushed the fix/339-optional-jakarta-bind-api branch from 7cc5e10 to 00e4ba3 Compare September 12, 2026 12:50
@bodewig
bodewig merged commit dfa47c9 into xmlunit:main Sep 16, 2026
pull Bot pushed a commit to boost-mw-poc/xmlunit_xmlunit that referenced this pull request Sep 16, 2026
@bodewig bodewig added this to the 2.14.0 milestone Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants