Differences between dependencymanagement and dependencies in maven
来源:互联网 发布:汤臣倍健跟安利 知乎 编辑:程序博客网 时间:2024/05/29 05:53
In dependencyManagement you declare dependency versions, exclusions and other things that let you manage them in place (e.g. a parent pom) for multiple projects.
- 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.
- Artifacts specified in the <dependencyManagement> section, will only be included in the child module if they were also specified in the <dependencies> 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.
In dependencies you then declare the actual usage/need of a dependency and if the dependency is managed in a parent pom you can do so without using a version and it will be inherited and therefore be consistant across your usages downstream of the the parent pom.
- A dependency defined under the dependencyManagement can be used in it's child modules without specifying the version.
- Artifacts specified in the <dependencies> section will ALWAYS be included as a dependency of the child module(s).
references: https://stackoverflow.com/questions/2619598/differences-between-dependencymanagement-and-dependencies-in-maven
阅读全文
0 0
- Differences between dependencymanagement and dependencies in maven
- Maven-DependencyManagement和Dependencies
- Maven-----dependencies PK dependencyManagement
- Maven dependencymanagement vs dependencies
- Differences between "in"/"out" and "nocopy"
- Differences between Protocol and Profile in Bluetooth
- Differences between String and StringBuilder in Java
- maven中DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven中的DependencyManagement和Dependencies
- Maven实战 --- dependencies与dependencyManagement
- The differences between alternate port and backup port in RSTP
- CodeIgniter 入门实践(博客站-1:单视图主页)
- 字符集为ZHS16GBK的数据库导入到字符集为AL32UTF8的数据库
- 静态库与动态库
- Find Minimum in Rotated Sorted Array:寻找升序数列中的断裂处
- 解决SwipeBackLayout滑动返回时显示桌面而不是显示上一层的Bug
- Differences between dependencymanagement and dependencies in maven
- HTML教程
- 数据结构上机实践第四周项目1
- vim中修改当前文本的模式类型(vim编辑文件有换行,记事本没有换行)
- 压测长链接过程记录
- scrapy提取不在标签内文字
- SpringMVC日期格式类型转换问题--3种处理方法
- Cloudera Hadoop运维管理与性能调优
- Ubuntu VMwork Station虚拟机清理拖拽产生的额外空间