gitgub

修改Maven的配置文件

vim conf/settings.xml

 

修改为阿里云的远程仓库地址

  <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>

修改本地仓库的地址

在settings标签內 复制被注释的localRepository 修改为自己的地址

<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>

 

分类:

技术点:

相关文章:

  • 2022-02-26
  • 2022-02-04
  • 2022-02-27
  • 2022-02-02
  • 2021-03-29
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2022-01-20
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-02-08
相关资源
相似解决方案