【Maven私服配置】

Maven私服配置

对于一些中央的pom,应该配置对应的mirror镜像访问

xml 复制代码
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

在上述中mirrorOf表示只有central的maven才会走这个镜像去访问下载;

其他的会走profit

xml 复制代码
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http:私服地址/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http:私服地址m/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

私服需要认证因此需要定义server

xml 复制代码
<servers>
<server>
<id>xx</id>
<username>xx</username>
<password>6xxx1</password>
</server>
</servers>

这里的server的ID没有意义,如果存在多个server会依次往下去找对应的server的用户和密码

相关推荐
CHEEVEN_QY11 小时前
新能源汽车电池托盘FSW量产的工艺稳定性控制
java·前端·汽车
惊讶的猫11 小时前
MCP-server
java
weixin_3823952311 小时前
本地部署 ERP 选型记录:从 Excel 到轻量系统的这几年
数据库·人工智能·数据挖掘
ZealSinger11 小时前
Boot4升级PostConstruct不跑了
java·spring boot·spring·升级迁移
Code_Solitude11 小时前
C语言:关于二维数组的作业总结
java·c语言·前端
Wang's Blog11 小时前
Java 项目实战: 外卖平台优化-Nginx六种负载均衡策略对比与选型
java·nginx·负载均衡
2401_8914092611 小时前
期货量化用得上的几类行情数据:逐笔、Level2、分钟线和五档tick
数据库
Wang's Blog11 小时前
Java 项目实战: 外卖平台优化-YApi接口管理平台与文档导入导出
java·开发语言·yapi
专业程序开发源12 小时前
django新闻推荐系统70655-计算机课程设计、毕业设计
java·javascript·spring boot·后端·python·django·课程设计
vx_Biye_Design12 小时前
springboot一站式旅游管理平台81037-计算机课程设计、毕业设计
java·vue.js·spring boot·后端·课程设计·express·旅游