Upgrade to JUnit 6 for Cucumber-JVM 8
MSALThe Cucumber-JVM 8 cucumber-junit-platform-engine requires JUnit Platform 6.1, which fails at test time when the build holds JUnit at 5.x, and cucumber-bom does not manage JUnit. Upgrade JUnit to 6.x, from an imported or platform junit-bom, from explicit versions, and from the junit-jupiter.version property a Spring Boot 3 parent manages JUnit with. Since JUnit 6, the platform shares the version of Jupiter, so junit-platform-suite and friends move from 1.x to 6.x as well.
org. openrewrite. cucumber. jvm. UpgradeJUnitForCucumber8mod run . --recipe= org. openrewrite. cucumber. jvm. UpgradeJUnitForCucumber8Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Upgrade Gradle or Maven dependency versions
org.junit:junit-bom:6.x - Upgrade Gradle or Maven dependency versions
org.junit.jupiter:*:6.x - Upgrade Gradle or Maven dependency versions
org.junit.platform:*:6.x - Upgrade Gradle or Maven dependency versions
org.junit.vintage:*:6.x - Upgrade the JUnit a Spring Boot 3 parent manages for Cucumber-JVM 8