Understanding Maven Dependency Resolution Principles

  1. Shortest Path Principle: In the case of multiple dependencies with different versions of the same JAR across different levels of dependency, Maven selects the version from the shortest path.

  2. Declaration Precedence Principle: When encountering multiple dependencies with different versions of the same JAR, and they share the same dependency path, Maven chooses the version declared first.

  3. Sibling Dependency Override Principle: When dependencies are at the same level and there are different versions of the same JAR, Maven follows the order of declaration, where later declarations override earlier ones.


See

Maven -- Introduction to the Dependency Mechanism

相关推荐
i220818 Faiz Ul3 分钟前
药店管理|基于springboot + vue药店管理系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·论文·毕设·美食分享系统
满怀冰雪9 分钟前
第15篇-链表基础-反转链表-合并链表与快慢指针
java·算法·链表
番茄去哪了17 分钟前
RabbitMQ
java·rabbitmq·java-rabbitmq
西凉的悲伤18 分钟前
redis-windows 安装 redis 到 windows 电脑
java·windows·redis·redis-windows
starsky7623819 分钟前
NIO与BIO的区别
java·服务器·nio
满怀冰雪25 分钟前
第14篇-队列与单调队列-解决窗口最值问题的关键结构
java·算法
Mahir0837 分钟前
ConcurrentHashMap 底层原理深度解密:从分段锁到 CAS + 红黑树的演进全解
java·面试·concurhashmap
阿维的博客日记41 分钟前
那用到动态代理,关键的特征又是什么呢
java·动态代理
liming49543 分钟前
Maven中央库迁移
服务器·前端·maven
都说名字长不会被发现44 分钟前
Spring Boot Starter 中间件账号密码加密方案设计与实现
java·spring boot·后端·中间件