新年开工后要开始新的项目,但是发现一些项目的依赖没有在阿里仓库Central或Public源之中,项目依赖还是要在外网中下载,很慢、很烦······
所以一番查找后,替换为阿里官方仓库服务站点:https://maven.aliyun.com/mvn/...
具体操作
- 打开 ${maven_home}/conf/settings.xml
-
在<mirrors>上面配置
<mirror> <id>aliyun-public</id> <mirrorOf>*</mirrorOf> <name>aliyun public</name> <url>https://maven.aliyun.com/repository/public</url> </mirror> <mirror> <id>aliyun-central</id> <mirrorOf>*</mirrorOf> <name>aliyun central</name> <url>https://maven.aliyun.com/repository/central</url> </mirror> <mirror> <id>aliyun-spring</id> <mirrorOf>*</mirrorOf> <name>aliyun spring</name> <url>https://maven.aliyun.com/repository/spring</url> </mirror> <mirror> <id>aliyun-spring-plugin</id> <mirrorOf>*</mirrorOf> <name>aliyun spring-plugin</name> <url>https://maven.aliyun.com/repository/spring-plugin</url> </mirror> <mirror> <id>aliyun-apache-snapshots</id> <mirrorOf>*</mirrorOf> <name>aliyun apache-snapshots</name> <url>https://maven.aliyun.com/repository/apache-snapshots</url> </mirror> <mirror> <id>aliyun-google</id> <mirrorOf>*</mirrorOf> <name>aliyun google</name> <url>https://maven.aliyun.com/repository/google</url> </mirror> <mirror> <id>aliyun-gradle-plugin</id> <mirrorOf>*</mirrorOf> <name>aliyun gradle-plugin</name> <url>https://maven.aliyun.com/repository/gradle-plugin</url> </mirror> <mirror> <id>aliyun-jcenter</id> <mirrorOf>*</mirrorOf> <name>aliyun jcenter</name> <url>https://maven.aliyun.com/repository/jcenter</url> </mirror> <mirror> <id>aliyun-releases</id> <mirrorOf>*</mirrorOf> <name>aliyun releases</name> <url>https://maven.aliyun.com/repository/releases</url> </mirror> <mirror> <id>aliyun-snapshots</id> <mirrorOf>*</mirrorOf> <name>aliyun snapshots</name> <url>https://maven.aliyun.com/repository/snapshots</url> </mirror> <mirror> <id>aliyun-grails-core</id> <mirrorOf>*</mirrorOf> <name>aliyun grails-core</name> <url>https://maven.aliyun.com/repository/grails-core</url> </mirror> <mirror> <id>aliyun-mapr-public</id> <mirrorOf>*</mirrorOf> <name>aliyun mapr-public</name> <url>https://maven.aliyun.com/repository/mapr-public</url> </mirror>
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。