【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的用户和密码

相关推荐
零千叶11 小时前
【面试】AI大模型应用原理面试题
java·设计模式·面试
CookieCrusher13 小时前
数据泄露危机逼近:五款电脑加密软件为企业筑起安全防线
运维·数据库·windows·安全·文件加密·数据防泄漏·dlp
这周也會开心14 小时前
SQL-窗口函数
数据库·sql
坐吃山猪16 小时前
SpringBoot01-配置文件
java·开发语言
TDengine (老段)16 小时前
TDengine 时间函数 WEEKDAY() 用户手册
大数据·数据库·物联网·时序数据库·iot·tdengine·涛思数据
我叫汪枫16 小时前
《Java餐厅的待客之道:BIO, NIO, AIO三种服务模式的进化》
java·开发语言·nio
TDengine (老段)16 小时前
从 ETL 到 Agentic AI:工业数据管理变革与 TDengine IDMP 的治理之道
数据库·数据仓库·人工智能·物联网·时序数据库·etl·tdengine
yaoxtao16 小时前
java.nio.file.InvalidPathException异常
java·linux·ubuntu
Swift社区18 小时前
从 JDK 1.8 切换到 JDK 21 时遇到 NoProviderFoundException 该如何解决?
java·开发语言
LQ深蹲不写BUG18 小时前
MySql的事务机制
数据库·mysql