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>

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

原文地址:https://www.cnblogs.com/qq1445496485/p/14783879.html