maven set up a mirrored address

Method One: Add (valid for all projects) in settings.xml maven folder in

     <mirror>
           <id>alimaven</id>
           <name>aliyun maven</name>
           <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
           <mirrorOf>central</mirrorOf>
     </mirror>

Method Two: Add (valid for the current project) in pom.xml maven project

     <!-- 使用aliyun镜像 -->
     <repositories>
           <repository>
                <id>aliyun</id>
                <name>aliyun</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public</url>
           </repository>
     </repositories>

Guess you like

Origin www.cnblogs.com/jiefu/p/10968296.html