总共修改两个地方, 一个settings.xml配置文件, 一个 pom.xml 文件.

修改maven配置文件settings.xml (当然也可以在用户home目录.m2下面添加一个settings.xml文件,记得备份.)

 

 

在 apache-maven-3.x.x/conf 目录下.

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

 

Maven镜像仓库更换为阿里云,快速加载依赖

 

Maven镜像仓库更换为阿里云,快速加载依赖

 

设置 idea

Maven镜像仓库更换为阿里云,快速加载依赖

 

 

 

二.更改项目的pom.xml配置文件, 重新导入即可


<repositories>
        <repository>
            <id>nexus-aliyun</id>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </repository>
</repositories>
 

 

 

 

 

 

 

相关文章:

  • 2021-12-15
  • 2021-09-20
  • 2022-12-23
  • 2022-02-17
  • 2021-12-05
  • 2021-09-03
  • 2022-02-07
猜你喜欢
  • 2022-01-18
  • 2021-09-11
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-03-03
相关资源
相似解决方案