在settings.xml文件中的mirrors下添加mirror标签

<!-- 阿里云仓库 -->
    <mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>
 
 
    <!-- 中央仓库1 -->
    <mirror>
        <id>repo1</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo1.maven.org/maven2/</url>
    </mirror>
 
 
    <!-- 中央仓库2 -->
    <mirror>
        <id>repo2</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo2.maven.org/maven2/</url>
    </mirror>


转自:https://www.cnblogs.com/pxblog/p/11617609.html

 

可以通过以下两个位置设置IDEA的全局默认设置:

settings 全局默认设置  Maven配置使用阿里云镜像

 

 settings 全局默认设置  Maven配置使用阿里云镜像

 

 以后诸如默认的maven配置就不需要每次都重复配置了

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-12-05
  • 2022-02-07
  • 2021-08-24
猜你喜欢
  • 2022-02-07
  • 2021-08-06
  • 2022-02-07
  • 2021-10-02
  • 2022-12-23
相关资源
相似解决方案