使用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>
所以根本不是镜像源的问题,接下来就解释另外的一种解决途径:
![](https://img-blog.csdnimg.cn/20200910163526878.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hneXNpbWlkYQ==,size_16,color_FFFFFF,t_70)
接下来,按照图示操作
![](https://img-blog.csdnimg.cn/20200910163647806.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hneXNpbWlkYQ==,size_16,color_FFFFFF,t_70)
输入的相关信息如下,请自行复制:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
然后点击Maven的刷新
![](https://img-blog.csdnimg.cn/20200910163901772.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hneXNpbWlkYQ==,size_16,color_FFFFFF,t_70)
最后显示构造成功
![](https://img-blog.csdnimg.cn/20200910163938547.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hneXNpbWlkYQ==,size_16,color_FFFFFF,t_70)