dependencyManagement集中管理依赖版本,dependencies节点声明依赖,并从父项目中继承版本号。

dependencyManagement允许在不添加所有子继承的依赖项的情况下合并和集中管理依赖版本。

dependencyManagement另一个非常重要的用例是对在传递依赖项中的版本控制。

Dependency Management allows to consolidate and centralize the management of dependency versions without adding dependencies which are inherited by all children. This is especially useful when you have a set of projects (i.e. more than one) that inherits a common parent.

Another extremely important use case of dependencyManagement is the control of versions of artifacts used in transitive dependencies. This is hard to explain without an example. Luckily, this is illustrated in the documentation.

https://stackoverflow.com/questions/2619598/differences-between-dependencymanagement-and-dependencies-in-maven

  • Dependency Management allows to consolidate and centralize the management of dependency versions without adding dependencies which are inherited by all children. This is especially useful when you have a set of projects (i.e. more than one) that inherits a common parent.Another extremely important use case of dependencyManagement is the control of versions of artifacts used in transitive dependencies.You still need to define them in the child POM to show that you are using them. They are not actually included in the child projects just because they are in in the parent POM. Enclosing dependencies in centralizes management of the version, scope, and exclusions for each dependency, if and when you decide to use it.
  • Artifacts specified in the section will ALWAYS be included as a dependency of the child module(s).Artifacts specified in the section will only be included in the child module if they were also specified in the section of the child module itself. Why is it good you ask? because you specify the version and/or scope in the parent, and you can leave them out when specifying the dependencies in the child POM. This can help you use unified versions for dependencies for child modules, without specifying the version in each child module.

Maven dependencymanagement vs dependencies相关推荐

  1. maven 中 pom.xml 配置文件标签说明,dependencyManagement和dependencies区别

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 参考:http://zhaoshijie.iteye.com/blog/2094478 http:/ ...

  2. dependencyManagement与dependencies区别

    一.dependencyManagement应用场景 为了项目的正确运行,必须让所有的子模块使用依赖项的统一版本,必须确保应用的各个项目的依赖项和版本一致,才能保证测试的和发布的是相同的结果.在我们项 ...

  3. dependencyManagement和dependencies的区别

    dependencyManagement和dependencies的区别 参考:http://zhaoshijie.iteye.com/blog/2094478 http://blog.csdn.ne ...

  4. 【maven】maven dependencyManagement 锁定Jar包版本

    1.概述 视频地址:maven dependencyManagement 锁定Jar包版本

  5. 获取公司的maven库 和 idea maven 中Projects Settings的Libraries中正常,但是在Maven Projects中Dependencies一直出现红线的解决办法

    一.获取公司的maven库. (1)我点击 Maven Projects 的 设置(如果idea页面上没有Maven Projects 这个框,那就去view->Tool Windows-> ...

  6. Maven打包提示dependencies.dependency.systemPath错误

    Maven打包提示dependencies.dependency.systemPath错误 具体信息如下: Some problems were encountered while building ...

  7. cmenu 隐藏子项中的一个子项_区分Maven中dependencyManagement与dependencies的作用

    导读:使用maven是为了更好的帮项目管理包依赖,maven的核心就是pom.xml.而maven中有许多的标签,下面我们主要讨论parent.dependencies与dependencyManag ...

  8. maven中DependencyManagement和Dependencies

    上次这边朋友问我一个问题,就是他们在pom.xml中的dependency中,看到有一些是<scope>provided</scope>的情况,比如如下: 双击代码全选 1 2 ...

  9. maven中的dependencies与dependencyManagement 对依赖管理的区别

    1. dependencyManagement对所依赖jar包进行版本管理, 而dependencies中的jar直接加到项目中. 2. dependencies即使在子项目中不写该依赖项,那么子项目 ...

最新文章

  1. 【怎样写代码】复杂对象的组装与创建 -- 建造者模式(二):解决方案
  2. MSSQL差异备份取系统权限
  3. 开源图像编辑器 GIMP 开发者透露 2019 年计划
  4. 把Qt的界面文件(.ui文件)生成源文件(.h或.cpp)封装成链接库
  5. 基于ArcGIS JS API 的点击查询功能
  6. RocketMQ 使用及常见问题
  7. 移位操作提高代码的可读性_本地记录或类,以提高流操作的可读性
  8. Nature、Science、Cell全加入!80家学术机构新冠研究全部免费
  9. 删远端分支报错remote refs do not exist或git: refusing to delete the current branch解决方法
  10. FLEX与JAVA不通讯错误与解决方法(转)
  11. pycharm 升级 pip
  12. 22年PMP考试【全真敏捷试题】
  13. SEO实战密码:60天网站流量提高20倍(第2版)
  14. 远程主机强迫关闭了一个现有的连接.
  15. 第十届泰迪杯数据挖掘B题:电力系统负荷预测分析--解题思路与部分代码03
  16. 离线高清卫星地图SDK及解决方案
  17. 深度学习视觉系统在雪糕盒产品中的全方位识别检测
  18. numpy.outer()函数
  19. Cobalt Strike 插件CrossC2(小白教程)
  20. 毕业设计 - java web 进销存管理系统的设计与实现【源码+论文】

热门文章

  1. mmyolo训练yolov5~ppyoloe
  2. Android简单美观计算器(界面部分)
  3. MySQL字段类型与Java中类型的对应
  4. 基于STM32的煤矿井下探测系统
  5. Linux配置 难记的命令 和 Sheel编程学习总结常用备注
  6. OGG-02022  Logmining server does not exist on this Oracle database.
  7. 雷建平:我亲历的中概股上市潮
  8. 对View的onMeasure方法理解
  9. BZOJ5197:[CERC2017]Gambling Guide(最短路,期望DP)
  10. 【Google Earth Studio】进阶编辑技巧