[英]why auto dependency is error version?(java.lang.ClassNotFoundException: org.junit.jupiter.api.MethodOrdererContext)
<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 junit-jupiter-engine-5.4.0.pom 依赖项是
[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:但我运行
mvn dependency:tree
,结果是这样的:
[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
maven3.5.4
This is duplicate of Gradle 5 JUnit BOM and Spring Boot Incorrect Versions .这是Gradle 5 JUnit BOM 和 Spring Boot Incorrect Versions 的副本。
The solution is to add the following to your Maven POM.解决方案是将以下内容添加到您的 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.在将 Spring Boot 依赖项更新到最新版本并将 Juiper 引擎版本更新到 5.6.1 解决了我的问题后,我遇到了类似的问题。
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.1</version>
<scope>test</scope>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.