[问题解决]idea junit5 failed to resolve org.junit.platform
问题 idea 无法运行junit5单元测试用例,错误提示:
Exception: intellij failed to resolve org.junit.platform:junit-platform-launcher:1.7.0
解决办法:
- 方式一 : 添加pom依赖
<dependencies>
<!-- ... -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<!-- ... -->
</dependencies>
- 方式二 :检查代理配置(本人情况)
Intellij IDEA > Preferences... > Appearance & Behavior > System Settings > HTTP Proxy
Changed from manual proxy to No Proxy settings

浙公网安备 33010602011771号