IDEA中maven项目依赖的包下载过慢

原文引用:https://www.zhihu.com/people/li-liang-48-56

1、在IDEA安装目录下找到setting.xml

例如:IntelliJ IDEA 2020.3\plugins\maven\lib\maven3\conf

找到相应的地方mirrors,添加以下内容:

<mirrors>  
        <mirror>  
          <!--This sends everything else to /public -->  
          <id>nexus</id>  
          <mirrorOf>*</mirrorOf>   
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
        </mirror>  
        <mirror>  
          <!--This is used to direct the public snapshots repo in the   
              profile below over to a different nexus group -->  
          <id>nexus-public-snapshots</id>  
          <mirrorOf>public-snapshots</mirrorOf>   
          <url>http://maven.aliyun.com/nexus/content/repositories/snapshots/</url>  
        </mirror>  
 </mirrors>

其他仓库:

<!-- 阿里云仓库 -->
	<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>
posted @ 2021-03-21 15:42  市井丛林  阅读(101)  评论(0)    收藏  举报