修改Maven配置项

0. 打开 Maven安装目录>conf>settings.xml

1. 修改本地仓库地址(默认是 Default: ${user.home}/.m2/repository 也就是用户目录下的/.m2/repository下)

修改为自己的本地仓库地址 <localRepository>xxx</localRepository>

2. 了解 servers

当你将仓库发布到远程仓库时,在这里设置serverid,用户名,用户地址

    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>

3. 修改mirrors 镜像管理

中央仓库下载速度过慢,可以直接从镜像下载

  <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>
     -->
  </mirrors>
posted @   DawnTraveler  阅读(243)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示