<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <version>5.4.0</version> <scope>test</scope> </dependency>
junit-jupiter-engine-5.4.0.pom dependency is
[INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.4.0:test
[INFO] | +- org.apiguardian:apiguardian-api:jar:1.0.0:test
[INFO] | +- org.junit.platform:junit-platform-engine:jar:1.3.2:test
[INFO] | | +- org.junit.platform:junit-platform-commons:jar:1.3.2:test
[INFO] | | \- org.opentest4j:opentest4j:jar:1.1.1:test
[INFO] | \- org.junit.jupiter:junit-jupiter-api:jar:5.3.2:test
but I run mvn dependency:tree
,result is this:
[INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.4.0:test [INFO] | +- org.apiguardian:apiguardian-api:jar:1.0.0:test [INFO] | +- org.junit.platform:junit-platform-engine:jar:1.3.2:test [INFO] | | +- org.junit.platform:junit-platform-commons:jar:1.3.2:test [INFO] | | \\- org.opentest4j:opentest4j:jar:1.1.1:test [INFO] | \\- org.junit.jupiter:junit-jupiter-api:jar:5.3.2:test
Build Tool: maven3.5.4
This is duplicate of Gradle 5 JUnit BOM and Spring Boot Incorrect Versions .
The solution is to add the following to your Maven POM.
<properties>
<junit-jupiter.version>5.4.0</junit-jupiter.version>
</properties>
I have faced similar issue after updating spring boot dependencies to latest version and updating Juiper engine version to 5.6.1 has resolved my issue.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.1</version>
<scope>test</scope>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.