当前位置: 首页 > 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.lryc.cn/news/617187.html

相关文章:

  • Django配置sqllite之外的数据库
  • 爬虫与数据分析结合案例学习总结
  • Apache Ignite 核心组件:GridClosureProcessor解析
  • pom.xml父子模块配置
  • 【Maven】01 - 入门篇
  • Maven 的 module 管理
  • 基于Spring Data Elasticsearch的分布式全文检索与集群性能优化实践指南
  • Maven 报错:Blocked mirror for repositories【完美解决】
  • 直接编辑pdf文件教程
  • SpringBoot 自动配置核心机制(面试高频考点)
  • wpf问题记录
  • 【2025最新版】PDF24 Creator,PDF编辑,合并分割,格式转换全能工具箱,本地离线版本,完全免费!
  • 【Maven】02 - 进阶篇
  • 《深度剖析前端框架中错误边界:异常处理的基石与进阶》
  • 华为虚拟防火墙配置案例详解
  • 基于SpringBoot+Uniapp的血压监控小程序(Echarts图形化分析)
  • 华为watch5心率变异性测量法的底层逻辑
  • Django ORM查询技巧全解析
  • 41.【.NET8 实战--孢子记账--从单体到微服务--转向微服务】--扩展功能--集成网关--网关集成Swagger
  • Spring MVC 注解参数接收详解:@RequestBody、@PathVariable 等区别与使用场景
  • kafka 中的Broker 是什么?它在集群中起什么作用?
  • [Oracle] UNPIVOT 列转行
  • CodeBuddy IDE完全食用手册:从安装到生产力爆发的技术流解剖
  • 视频前处理技术全解析:从基础到前沿
  • 【安全发布】微软2025年07月漏洞通告
  • AI大模型:(二)5.1 文生视频(Text-to-Video)模型发展史
  • 从ELF到进程间通信:剖析Linux程序的加载与交互机制
  • 音视频学习(五十三):音频重采样
  • 动态创建可变对象:Python类工厂函数深度解析
  • Vue3从入门到精通:3.1 性能优化策略深度解析