当前位置: 首页 > news >正文

通用 maven 私服 settings.xml 多源配置文件(多个仓库优先级配置)

<?xml version="1.0" encoding="UTF-8"?>
<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>D:\tools\maven\repository</localRepository><!-- ✅ 私服认证 --><servers><server><id>maven-releases</id><username>xxx</username><password>xxx</password></server><server><id>maven-snapshots</id><username>xxx</username><password>xxx</password></server></servers><!-- ✅ 仓库优先级通过 profile 控制 --><profiles><profile><id>custom-repo-profile</id><activation><activeByDefault>true</activeByDefault></activation><repositories><!-- ✅ 1. 阿里云仓库 --><repository><id>aliyun</id><url>https://maven.aliyun.com/repository/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository><!-- ✅ 2. 官方 Maven Central 仓库 --><repository><id>central</id><url>https://repo1.maven.org/maven2/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></repository><!-- ✅ 3. 私服仓库 --><repository><id>maven-public</id><url>http://10.xxx:xxx/repository/maven-public/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories><!-- ✅ 插件仓库配置(和上面保持一致) --><pluginRepositories><pluginRepository><id>aliyun</id><url>https://maven.aliyun.com/repository/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository><pluginRepository><id>central</id><url>https://repo1.maven.org/maven2/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository><pluginRepository><id>maven-public</id><url>http://10.xxx:xxx/repository/maven-public/</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository></pluginRepositories></profile></profiles><!-- ✅ 激活仓库配置 --><activeProfiles><activeProfile>custom-repo-profile</activeProfile></activeProfiles>
</settings>
http://www.dtcms.com/a/325786.html

相关文章:

  • SQL179 每个6/7级用户活跃情况
  • 十一、Linux Shell脚本:函数与模块化
  • 逃离城市与喧嚣,拥抱新的生活方式
  • 开博尔雷电5数据线:120Gbps“闪电传输”,以Intel硬核基因从容优化数字生活
  • 【SpringBoot】持久层 sql 注入问题
  • C/C++练习面试题
  • PyTorch基础(使用Numpy实现机器学习)
  • PyTorch基础(使用Tensor及Antograd实现机器学习)
  • OCSSA-VMD-Transformer轴承故障诊断,特征提取+编码器!
  • cs的搭建和使用
  • 力扣-153.寻找旋转排序数组中的最小值
  • Kubernetes-核心概念
  • 2438. 二的幂数组中查询范围内的乘积
  • flutter入门
  • 从 Kotlin ViewModel 到 Flutter:完整迁移指南与状态管理实践
  • Flutter Dialog、BottomSheet
  • Python调用C/C++函数库的多种方法与实践指南
  • LCR 120. 寻找文件副本
  • LLM 残差链接是什么
  • TRL - Transformer Reinforcement Learning SFTTrainer 和 SFTConfig
  • docker是什么以及镜像命令详解
  • ROS2学习(1)—基础概念及环境搭建
  • B 树与 B + 树解析与实现
  • 北斗水文环境监测站在水库的应用
  • Linux操作系统从入门到实战(二十)进程优先级
  • 【从零开始java学习|第一篇】java中的名词概念(JDK、JVM、JRE等等)
  • 15. xhr 对象如何发起一个请求
  • VSCode右键菜单消失,修复VSCode右键菜单
  • raid10 允许最多坏几块磁盘,如何修复阵列?
  • lesson35:数据库深度解析:从概念到MySQL实战学习指南