今天在學習maven框架的時候出現Could not transfer artifact org.apache.maven.plugins問題,后面根據很多博客綜合總結,終於解決了,現在分享一下我的方法
1、首先保證你的settings配置沒問題
這里打開File - settings進行路徑配置,選擇自己的maven路徑進行設置。
2、maven中的settings.xml文件中的鏡像資源配置,代碼如下
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<!-- junit鏡像地址 -->
<mirror>
<id>junit</id>
<name>junit Address/</name>
<url>http://jcenter.bintray.com/</url>
<mirrorOf>central</mirrorOf>
</mirror>
配置阿里雲的鏡像資源。
3、更改idea中的settings設置,解決證書等問題,向File - settings中的maven - importing中添加這句
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
點擊other settings選項
如圖所示
到這里基本就ok了,最后祝你們好運,能夠快速解決!
本人新人一枚,如果有問題,歡迎各位大佬指教,謝謝!