Differences between dependencyManagement and dependencies in Maven

前端 未结 13 1402
北荒
北荒 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条回答
  •  Happy的楠姐
    2020-11-22 04:54

    It's like you said; dependencyManagementis used to pull all the dependency information into a common POM file, simplifying the references in the child POM file.

    It becomes useful when you have multiple attributes that you don't want to retype in under multiple children projects.

    Finally, dependencyManagement can be used to define a standard version of an artifact to use across multiple projects.

提交回复
热议问题