标签:profile groups ups code url tin file content users
在%USERPROFILE%\.m2\settings.xml
例如:C:\Users\LongShu\.m2\settings.xml
可以自定义Maven的一些参数,
复制%M2_HOME%\conf\settings.xml
到这个目录修改一下配置。
<localRepository>D:\Dev_Tool\m2repository</localRepository>
本地仓库地址将从%USERPROFILE%\.m2\
变为D:\Dev_Tool\m2repository\
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>jcenter</id>
<mirrorOf>central</mirrorOf>
<name>jcenter.bintray.com</name>
<url>http://jcenter.bintray.com/</url>
</mirror>
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</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>
将把原来https的仓库变为http的aliyun中央仓库。
<repositories>
<repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
<repository>
<id>jcenter</id>
<name>jcenter Repository</name>
<url>http://jcenter.bintray.com/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
标签:profile groups ups code url tin file content users
原文地址:http://www.cnblogs.com/ThinkVenus/p/7219951.html