Maven repository to replace Ali mirror

When using Maven, the default warehouse is abroad, especially slow download speeds, we replaced the domestic mirrors

1. Locate the installation directory: setting.xml file
Here Insert Picture Description
to add content:

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

Note: Be sure to comment out the original content

2. Add in the project pom.xml in

 <repositories>
    <repository>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

Here Insert Picture Description

Then you add the coordinates will feel when the speed is particularly fast, this dependency when creating a new project, we must add, that we pay attention!

Published 47 original articles · won praise 34 · views 8876

Guess you like

Origin blog.csdn.net/weixin_42893085/article/details/105137199