Skip to content

Fix junit-platform version pinned by xtext-dev-bom shadowing junit.version - #423

Merged
hugohills-regnosys merged 1 commit into
finos:dependabot/maven/junit.version-6.1.3from
REGnosys:hugo/fix-junit-platform-version
Sep 15, 2026
Merged

hugohills-regnosys merged 1 commit into
finos:dependabot/maven/junit.version-6.1.3from
REGnosys:hugo/fix-junit-platform-version

Conversation

@hugohills-regnosys

Copy link
Copy Markdown
Contributor

Summary

  • Bump junit.version from 5.9.1 to 6.1.3 #411 (bumps junit.version 5.9.1 → 6.1.3) fails all tests with:
    java.lang.NoSuchMethodError: 'org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction.closeAutoCloseables()'
    
  • Root cause: xtext-dev-bom (imported in dependencyManagement before junit-bom) pins junit-platform-commons/junit-platform-engine to its own, older junit-platform-version (1.10.2) — confirmed by fetching xtext-dev-bom-2.38.0.pom from Maven Central. Since it's imported first, that pin wins over junit-bom's 6.1.3. junit-jupiter-engine:6.1.3 then runs against junit-platform-engine:1.10.2, which predates the closeAutoCloseables() API jupiter-engine 6.1.3 calls.
  • Fix: add explicit dependencyManagement entries for junit-platform-commons/junit-platform-engine pinned to ${junit.version}, mirroring the existing junit-jupiter-api/junit-jupiter-engine overrides right above them (which exist for the same reason).

This targets #411's own branch (dependabot/maven/junit.version-6.1.3), not main — same reasoning as rune-common#738 and rune-testing#413: the fix only makes sense paired with this exact bump.

Test plan

  • mvn dependency:treejunit-platform-commons/junit-platform-engine now resolve to 6.1.3 (previously 1.10.2).
  • mvn test — all 94 tests pass (previously failed with the error above).

xtext-dev-bom (imported above junit-bom in dependencyManagement) pins
junit-platform-commons/junit-platform-engine to its own
junit-platform-version (1.10.2), and since it's imported first, that
pin wins over junit-bom's. Bumping junit.version to 6.1.3 left
junit-jupiter-engine:6.1.3 running against junit-platform-engine:1.10.2,
which predates the closeAutoCloseables() API jupiter-engine 6.1.3 calls:

  java.lang.NoSuchMethodError: 'org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction.closeAutoCloseables()'

Fix: add explicit dependencyManagement entries for junit-platform-commons
and junit-platform-engine at ${junit.version}, mirroring the existing
junit-jupiter-api/junit-jupiter-engine overrides right above them.

Verified: `mvn dependency:tree` now resolves junit-platform-* to 6.1.3,
and `mvn test` passes all 94 tests (previously failed with the error
above).
@hugohills-regnosys
hugohills-regnosys merged commit 5474fd5 into finos:dependabot/maven/junit.version-6.1.3 Sep 15, 2026
6 checks passed
@hugohills-regnosys
hugohills-regnosys deleted the hugo/fix-junit-platform-version branch September 15, 2026 20:47
hugohills-regnosys added a commit that referenced this pull request Sep 15, 2026
* Bump junit.version from 5.9.1 to 6.1.3

Bumps `junit.version` from 5.9.1 to 6.1.3.

Updates `org.junit:junit-bom` from 5.9.1 to 6.1.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](junit-team/junit-framework@r5.9.1...r6.1.3)

Updates `org.junit.jupiter:junit-jupiter-api` from 5.9.1 to 6.1.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](junit-team/junit-framework@r5.9.1...r6.1.3)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.9.1 to 6.1.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](junit-team/junit-framework@r5.9.1...r6.1.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 6.1.3
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 6.1.3
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: org.junit:junit-bom
  dependency-version: 6.1.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Override xtext-dev-bom's junit-platform pin to match junit.version (#423)

xtext-dev-bom (imported above junit-bom in dependencyManagement) pins
junit-platform-commons/junit-platform-engine to its own
junit-platform-version (1.10.2), and since it's imported first, that
pin wins over junit-bom's. Bumping junit.version to 6.1.3 left
junit-jupiter-engine:6.1.3 running against junit-platform-engine:1.10.2,
which predates the closeAutoCloseables() API jupiter-engine 6.1.3 calls:

  java.lang.NoSuchMethodError: 'org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction org.junit.platform.engine.support.store.NamespacedHierarchicalStore$CloseAction.closeAutoCloseables()'

Fix: add explicit dependencyManagement entries for junit-platform-commons
and junit-platform-engine at ${junit.version}, mirroring the existing
junit-jupiter-api/junit-jupiter-engine overrides right above them.

Verified: `mvn dependency:tree` now resolves junit-platform-* to 6.1.3,
and `mvn test` passes all 94 tests (previously failed with the error
above).

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hugo Hills <39260692+hugohills-regnosys@users.noreply.github.com>
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.

1 participant