令人头疼的Could not transfer artifact org.apache.maven.plugins问题
有一天突然我的idea就导入不了依赖了,网上查找解决方法,通过很多种方式改setting文件中的镜像等等操作最终解决了不可以下载这个问题,但是地下有一行爆红的提示:Could not transfer artifact org.apache.maven.plugins,又经过查询资料,最终解决,总结如下:
1、首先保证你的settings配置没问题
2、maven中的settings.xml文件中的镜像资源配置
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</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
4、向File - settings中的maven - Runner中添加这句话:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true -DarchetypeCatalog=internal
到此为止我的就好了