Maven - making child projects that can be independent of their parent

后端 未结 5 874
一生所求
一生所求 2020-12-23 17:01

I\'m a bit of a Maven newb, and I\'m trying to setup a maven project that builds several child projects, but still allows someone to just grab one of the child projects and

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 17:51

    It seems to me that the problem is that Maven is overloading the parent tag. Maven docs keep telling me that Inheritance and Aggregation are two different things, yet both use the same tag to achieve their function. This does militate against the scenario that the original poster is asking. One may want to

    1. inherit certain settings from a common parent, yet
    2. have two builds of different applications sharing a common component.

    Thus we have two different understandings of the parent relationship here. First, the "parent" contributing the settings for each module and second, the "parent" whose build builds the child. Since there are two of the latter, this breaks down. The two ideas of parentage get in each other's way.

提交回复
热议问题