dependencyManagement and scope

前端 未结 4 1432
既然无缘
既然无缘 2020-12-24 04:41

I usually put a section in parent-project/pom.xml. This section contains dec

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-24 05:09

    dependencyManagement is just here to define dependencies version for all project submodules, the only pertinent scope in this section is import for BOMs.

    Scope must be defined in dependencies section.

    (For a given dependency it determines the usage context. It allows to include the dependency only when it is required for execution. For example an ear will not be packaged with Java-ee dependencies (scope provided) as it will find them on the target server.)

    [edit]

    The first statement has an exception, the scope provided in dependencyManagement section will override defined scope in dependencies sections. see DependencyManagement to force scope

提交回复
热议问题