fix: stop JUnit 5 leak from junit6 modules#2244
Merged
Merged
Conversation
The `vaadin-testbench-core-junit6` and `vaadin-testbench-unit-junit6` modules were empty wrappers depending on their JUnit 5 siblings. Their published POMs therefore advertised `junit-platform-engine:1.14.0` and the rest of the JUnit 5 line as transitive dependencies. Consumers building against `junit-bom:6.x` ended up with a mixed graph where `junit-platform-engine:1.14.0` could win Maven's nearest-wins resolution, causing `NoClassDefFoundError` at test runtime. Rework both modules to share source with their JUnit 5 sibling via `build-helper-maven-plugin` instead of depending on it, mirroring the pattern already used by `vaadin-testbench-integration-tests-junit6`. Each module now imports `junit-bom`, declares its own JUnit dependencies, and compiles the shared sources, so the published artifacts contain classes and expose only JUnit 6 transitives. Fixes #2219
Test Results83 tests 80 ✅ 8m 37s ⏱️ Results for commit c20c372. ♻️ This comment has been updated with latest results. |
caalador
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
vaadin-testbench-core-junit6andvaadin-testbench-unit-junit6modules were empty wrappers depending on their JUnit 5 siblings. Their published POMs therefore advertisedjunit-platform-engine:1.14.0and the rest of the JUnit 5 line as transitive dependencies. Consumers building againstjunit-bom:6.xended up with a mixed graph wherejunit-platform-engine:1.14.0could win Maven's nearest-wins resolution, causingNoClassDefFoundErrorat test runtime.Rework both modules to share source with their JUnit 5 sibling via
build-helper-maven-plugininstead of depending on it, mirroring the pattern already used byvaadin-testbench-integration-tests-junit6. Each module now importsjunit-bom, declares its own JUnit dependencies, and compiles the shared sources, so the published artifacts contain classes and expose only JUnit 6 transitives.Fixes #2219