Differences between dependencyManagement and dependencies in Maven

前端 未结 13 1157
北荒
北荒 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:56

    If you have a parent-pom anyways, then in my opinion using just for controlling the version (and maybe scope) is a waste of space and confuses junior developers.

    You will probably have properties for versions anyways, in some kind of parent-pom file. Why not just use this properties in the child pom's? That way you can still update a version in the property (within parent-pom) for all child projects at once. That has the same effect as just without .

    In my opinion, should be used for "real" management of dependencies, like exclusions and the like.

提交回复
热议问题