很少接触Maven和其他外部库。Junit一周前工作得很好,可能受到了更新的影响?无法确定,在试图安装其他版本时也会发生相同的错误。
晚上10:08。存储库同步:没有下载junit的文件:junit:5.0-快照
再说一次,一周前它运行得很好,下面是测试- https://github.com/Ry4nW/CS-11-VLN/blob/main/CS%2011%20VLN/IntegerSetTest/TestCases/IntegerSetTests.java
发布于 2021-03-25 15:14:16
您的依赖项配置错误。根据您的测试,您使用的是JUnit 4。
<dependency>
<groupId>junit</groupId>
<artifactId>junit<artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>没有版本5.x的junit:junit。JUnit 5使用不同的组和工件ID。例如。
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.1</version>
<scope>test</scope>
</dependency>https://stackoverflow.com/questions/66793494
复制相似问题