从github上下载了一个springboot项目,添加到idea后pom文件中有依赖未找到,提示update maven indices,并且更新缓慢,这时需要配置maven镜像仓库。
将以下配置粘贴到本地maven的settings.xml文件中标签中,使用阿里云镜像。
?? ?<mirror>
?? ??? ??? ?<id>nexus-aliyun</id>
?? ??? ??? ?<mirrorOf>*</mirrorOf>
?? ??? ??? ?<name>Nexus aliyun</name>
?? ??? ??? ?<url>http://maven.aliyun.com/nexus/content/groups/public</url>
?? ?</mirror>
接下来,找到IDEA File | Settings | Build, Execution, Deployment | Build Tools | Maven,
将User settings file与Local repository后面Override打勾。
重新更新maven仓库。