Maven下载缓慢

Maven下载依赖包特别慢

原因是使用了特别慢的网络仓库,解决办法更改阿里云的网络仓库就行
1.Idea setting搜索maven
2.更改user setting file为本地的setting.xml地址,setting.xml内容如下(放在.m2文件夹下)

<settings>
 <localRepository>C:\Users\XiaoYu\.m2\repository</localRepository>
 <servers>
    <server>
       <id>archiva.internal</id> 
       <username>admin</username> 
       <password>admin123</password> 
    </server>

    <server>
       <id>archiva.snapshots</id> 
       <username>admin</username> 
       <password>admin123</password> 
    </server>
 </servers>

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

更改成功后重启idea,问题解决

上一篇:maven mybatis小结20200313


下一篇:webstorm eslint prettier 的配置