Could not transfer artifact xxx from/to xxx解决方案

maven中默认的镜像加载是这个

在setting.xml文件中

<mirror>
   <id>nexus</id>
   <mirrorOf>*</mirrorOf>
   <name>internal nexus repository</name>
   <url>http://10.159.62.231:9090/repository/maven-public/</url>
</mirror> 

将其替换为阿里的镜像

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

然后在本地仓库中将原先导入的依赖删除掉,重新导入就可以了。

 

posted @ 2021-05-19 10:01  云村的王子  阅读(2029)  评论(0编辑  收藏  举报