令人头疼的Could not transfer artifact org.apache.maven.plugins问题

令人头疼的Could not transfer artifact org.apache.maven.plugins问题

有一天突然我的idea就导入不了依赖了,网上查找解决方法,通过很多种方式改setting文件中的镜像等等操作最终解决了不可以下载这个问题,但是地下有一行爆红的提示:Could not transfer artifact org.apache.maven.plugins,又经过查询资料,最终解决,总结如下:

1、首先保证你的settings配置没问题

image-20220608151653789

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

到此为止我的就好了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值