Maven set up a local warehouse and Ali cloud remote warehouse

When maven project into jar package coordinates need to connect maven official repository download, but the download speed of moving, so to modify the settings.

Set to be connected to a local warehouse and Ali cloud remote repository.

(If not the local warehouse jar)

  1. Find the appropriate configuration files: for example, my directory: C: \ soft \ apache-maven-3.6.2 \ conf \ settings.xml find setting.xml.
  2. Open the file with setting.xml notepad ++. Find <localRepository> label
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
   <localRepository>/path/to/local/repo</localRepository>
   -> 
Insert the following line, the line 50 is generally at

about
the main role is to set their own local repository path. For example, my local bin path is C: \ soft \ repo
<localRepository>C:\soft\repo</localRepository>

  3. Locate the <mirrors> </ mirrors> these two labels

  4. Add the label:

      <mirror>
                <id>alimaven</id>
                <name>aliyun maven</name>
              <url>http://maven.aliyun.com/nexus/content/groups/public</url>
              <mirrorOf>central</mirrorOf>
          </ mirror> 
This is mainly set up Ali cloud-based remote repository.

Below is a screenshot of my profile:

 

Guess you like

Origin www.cnblogs.com/pansin/p/12043852.html
Recommended