Maven is a need to change the address of the warehouse Ali cloud & modify the local address of the warehouse

Maven modify configuration files

vim conf/settings.xml

 

Ali cloud modify the address of a remote repository

  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    <mirror>
      <id>nexus-aliyun</id>
      <mirrorOf>*,!jeecg,!jeecg-snapshots,!mapr-releases</mirrorOf>
      <name>Nexus aliyun</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>
   
    <mirror>
      <id>mapr-public</id>
      <mirrorOf>mapr-releases</mirrorOf>
      <name>mapr-releases</name>
      <url>https://maven.aliyun.com/repository/mapr-public</url>
    </mirror>
  </mirrors>

Modify the address of the local warehouse

Annotated copy of the label in the localRepository modify settings for your address

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   | 
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <localRepository>/usr/local/apache-maven-3.5.4/local_repository</localRepository>

 

Guess you like

Origin www.cnblogs.com/gitgub/p/11783936.html
Recommended