Copy maven 安装目录的settings.xml 到~/.m2/ 下面,如下修改
在新的settings.xml 新增aliyun mirror
146 <mirrors>
147 <!-- mirror
148 | Specifies a repository mirror site to use instead of a given repository. The repository that
149 | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
150 | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
151 |
152 <mirror>
153 <id>mirrorId</id>
154 <mirrorOf>repositoryId</mirrorOf>
155 <name>Human Readable Name for this Mirror.</name>
156 <url>http://my.repository.com/repo/path</url>
157 </mirror>
158 -->
159
160 <mirror>
161 <id>alimaven</id>
162 <mirrorOf>central</mirrorOf>
163 <name>aliyun maven</name>
164 <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
165 </mirror>
166
167 </mirrors>
网友评论