本文原先发表与博客园( ),不过我的博客园已经不再更新了,原有博文会逐步迁移的。
修改 配置文件
maven 安装 路径
F:\apache-maven-3.3.9\conf
修改 settings.xml
在<mirrors>
<!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> </mirrors>添加 如下 内容 访问 开源中国的jar 下载源
<mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
---------------------------------------------------------------------------------------------------------------------------
以下是完整的:settings.xml
1 2 3 21 22 4649 55 F:\apache-maven-3.3.9\MyRepository 56 57 65 66 73 74 7980 84 85 86 9192 106 107 108 112113 126 127 134 135 136 147148 149 193 194 215150 155repo2 151central 152Human Readable Name for this Mirror. 153http://repo2.maven.org/maven2/ 154156 161net-cn 157central 158Human Readable Name for this Mirror. 159http://maven.net.cn/content/groups/public/ 160162 167ui 163central 164Human Readable Name for this Mirror. 165http://uk.maven.org/maven2/ 166168 173ibiblio 169central 170Human Readable Name for this Mirror. 171http://mirrors.ibiblio.org/pub/mirrors/maven2/ 172174 179jboss-public-repository-group 175central 176JBoss Public Repository Group 177http://repository.jboss.org/nexus/content/groups/public 178180 185CN 181OSChina Central 182http://maven.oschina.net/content/groups/public/ 183central 184186 191 192alimaven 187central 188aliyun maven 189http://maven.aliyun.com/nexus/content/groups/public/ 190216 245 246 280 281 282 290
本文为博主原创文章,转载请注明出处!
https://my.oschina.net/u/3375733/blog/