Failed to resolve org.junit.platform:junit-platform-launcher:1.5.2 测试报错
找了很长时间,这是因为缺少依赖,我添加一个依赖也这样,添加两个也是这样,气炸
再找找原因,是因为我用的是手机的热点流量,手机还限速了,所以导致下载不下来
解决方法:
要添加4个依赖:
<!-- Junit依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- this is needed or IntelliJ gives junit.jar or junit-platform-launcher:1.3.2 not found errors -->
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
手动添加进去下载就好了
最后:帮到你点个赞呗!!