Differences between dependencyManagement and dependencies in Maven

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

    Just in my own words, your parent-project helps you provide 2 kind of dependencies:

    • implicit dependencies : all the dependencies defined in the section in your parent-project are inherited by all the child-projects
    • explicit dependencies : allows you to select, the dependencies to apply in your child-projects. Thus, you use the section, to declare all the dependencies you are going to use in your different child-projects. The most important thing is that, in this section, you define a so that you don't have to declare it again in your child-project.

    The in my point of view (correct me if I am wrong) is just useful by helping you centralize the version of your dependencies. It is like a kind of helper feature.

提交回复
热议问题