修改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>
分类:
java学习 / Maven学习
标签:
Maven学习
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了