failed to resolve org.junit.platform


 

IDEA提示:failed to resolve org.junit.platform,如下圖

 

方法一:修改Maven鏡像

D:\Program Files\apache-maven-3.6.3-pc\conf

 

 

添加配置信息

<mirror> 
<id>alimaven</id> 
<name>aliyun maven</name> 
<url>https://maven.aliyun.com/nexus/content/groups/public/</url> 
<mirrorOf>central</mirrorOf>
</mirror>

 

 

 

方法二:修改配置依賴 pom.xml

在項目的依賴配置文件 pox.xml 里加上以下代碼:

<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>

 

參考:

https://blog.csdn.net/qiuyeyijian/article/details/104401631


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM