Use junit-bom for JUnit dependencies. #570
Open
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.
With the changed to using JUnit 5 in 2023, it would be preferable to use the
junit-bom
for managing all JUnit dependencies.BOM (Bill of Materials) files make version management easier -- since when upgrading JUnit, a version number change is only needed in one place -- and ensure a consistent version of JUnit artifacts are used throughout the project, even when pulled in transitively. For example, if a user where to add an additional testing library or framework that transitively pulls in (as an example) version 5.6.3 of
junit-vintage-engine
, the BOM would result in that being upgraded to the same version as the BOM, v5.8.2 in this example. Without the BOM, version 5.6.2 ofjunit-vintage-engine
would get used, resulting in a mismatch of JUnit artifacts.References: