Maven and dependent modules

后端 未结 6 1781
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 08:16

Colleagues have been touting the wonders of maven and its magical dependency stuff but I\'m finding that it fails at what I would consider the obvious use.

Suppose I

6条回答
  •  爱一瞬间的悲伤
    2020-12-13 08:58

    Rich is totally right. What you describe is generally not the expected behaviour. Although, as stated by deterb, the Maven reactor supports partial builds if the modules are known by the parent POM.

    Building with mvn install -pl B -am should also make (-am) B's dependencies (that is, A).

    Anyway, module A must be a module of the parent POM.

    (see Maven Modules + Building a Single Specific Module)

提交回复
热议问题