Differences between dependencyManagement and dependencies in Maven

前端 未结 13 1401
北荒
北荒 2020-11-22 04:14

What is the difference between dependencyManagement and dependencies? I have seen the docs at Apache Maven web site. It seems that a dependency def

13条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 04:58

    There are a few answers outlining differences between and tags with maven.

    However, few points elaborated below in a concise way:

    1. allows to consolidate all dependencies (used at child pom level) used across different modules -- clarity, central dependency version management
    2. allows to easily upgrade/downgrade dependencies based on need, in other scenario this needs to be exercised at every child pom level -- consistency
    3. dependencies provided in tag is always imported, while dependencies provided at in parent pom will be imported only if child pom has respective entry in its tag.

提交回复
热议问题