如何解决Could not transfer metadata org.apache.maven.plugins:maven-archetype-plugin/..

使用idea新建Maven项目的时候报了Could not transfer metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml from/to alimaven (http://maven.aliyun.com/nexus/content/repositories/central/): Transfer failed for http://maven.aliyun.com/nexus/content/repositories/central/o的错误,网上解释说是镜像的原因,我之前就已经进行了镜像源设置,设置如下:


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

 所以根本不是镜像源的问题,接下来就解释另外的一种解决途径:

接下来,按照图示操作

输入的相关信息如下,请自行复制:

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

然后点击Maven的刷新

最后显示构造成功

猜你喜欢

转载自blog.csdn.net/xgysimida/article/details/108517420