Maven - include all submodules of a pom as dependencies in another module

前端 未结 3 1256
忘掉有多难
忘掉有多难 2020-12-20 12:19

We have a maven module that is set up as so:

a (parent)
  -> b (submodule)
  -> c (submodule)
  -> d (submodule)

This list of subm

3条回答
  •  天命终不由人
    2020-12-20 13:16

    The only way dependencies get "automatically" included is via the transitive dependency mechanism, and it only works by pulling in dependencies of dependencies, so unless you have a pom that depends on all the submodules, no, you won't get them without listing them all out. A need to do this points to a flaw in your project design. If the modules are "all or none", then they're probably not separate modules.

提交回复
热议问题