欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

如何在Maven中设置国内镜像源

最编程 2024-07-29 07:34:07
...
<!-- 加在<mirrors>中添加--> <mirrors> <mirror> <id>mvnrepository</id> <mirrorOf>mvnrepository</mirrorOf> <url>http://mvnrepository.com/</url> </mirror> <!--自定义添加--> <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror> <!--默认的*仓库--> <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> <mirror> <id>96nexus</id> <mirrorOf>*</mirrorOf> <name>96nexus</name> <url>http://172.18.64.96:8080/nexus/content/groups/public/</url> </mirror> <mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>nexus-aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> <!-- 阿里仓库--> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <!-- maven仓库官方--> <mirror> <id>nexus</id> <name>internal nexus repository</name> <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>--> <url>http://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>