修改settings.xml
<!-- 配置本地maven的仓库 --> <localRepository>D:\file\path\maven\repository</localRepository> <!-- 配置*仓库为阿里云仓库 --> <mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>