-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
junit-vintage-engine:5.8.0 requires junit:junit:{strictly 4.13.2} #2722
Comments
Does the same happen with Maven 3.x? IIRC, the "first BOM that defines a version wins", thus if the JUnit BOM is loaded before Jackson's BOM, |
We switched to using a version range for our internal dependency management with 5.8: junit5/gradle/libs.versions.toml Line 31 in a295157
However, we have the following config in place: junit5/buildSrc/src/main/kotlin/java-library-conventions.gradle.kts Lines 95 to 103 in 931ecaa
This causes {
"group": "junit",
"module": "junit",
"version": {
"strictly": "4.13.2",
"requires": "4.13.2"
}
} In 5.7.2 that used to be: {
"group": "junit",
"module": "junit",
"version": {
"requires": "4.13"
}
} I think the right thing to do would be to remove {
"group": "junit",
"module": "junit",
"version": {
"strictly": "[4.12,)",
"requires": "[4.12,)",
"prefers": "4.13.2"
}
} However, that would also cause the version range to be published in the POM which I initially wanted to avoid since I'm not sure if using it would break any consumers: <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>[4.12,)</version>
<scope>compile</scope>
</dependency> @junit-team/junit-lambda @wilkinsona Thoughts? |
Actually, I think the better fix as it's less risky would be to change our version declaration from {
"group": "junit",
"module": "junit",
"version": {
"requires": "4.13.2"
}
} and the POM: <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>compile</scope>
</dependency> |
@wilkinsona Why were you using |
With 5.8.1-SNAPSHOT from https://oss.sonatype.org/content/repositories/snapshots/ it works (see build scan). |
@wilkinsona Would we still be in time for the upcoming Spring Boot release if we released 5.8.1 this weekend or early next week? |
A little late, but for what it's worth, I much prefer the subsequent refinement that avoided a version range appearing in the pom. I, too, am rather wary of version ranges in poms and the effects that they can have.
To mimic Spring Boot's build. It enforces dependency versions internally (so that we know exactly what we're testing against), while being more relaxed in its public metadata.
Right.
Absolutely. We'd like to include 5.8 in Spring Boot 2.6 but it doesn't reach RC for another month or so. Thanks very much for looking at this so quickly. |
Building a project with JUnit 5.8.0 and Jackson 2.12.5 can result in a build failure due to
junit-vintage-engine-5.8.0
strictly requiringjunit:junit:4.13.2
. Jackson 2.12.5's bom manages the version as 4.13.1. I suspect this dependency management should not be present in Jackson's bom and have opened FasterXML/jackson-bom#43, but it's been there for quite some time and this problem only appeared when upgrading to JUnit 5.8.0 from 5.7.Here's a build scan from building Spring Boot where I originally discovered the problem: https://ge.spring.io/s/xwscy4qijm2w6/failure#1.
Steps to reproduce
Here's a much simpler build that should reproduce the problem using Gradle 6.9.1:
If you downgrade
junit-vintage-engine
to 5.7.2 the problem does not occur:Context
Deliverables
The text was updated successfully, but these errors were encountered: