简体   繁体   中英

Maven same aggregator and parent (same pom). Independent sub-modules versions

I started reading about good practices related to multi-module maven projects, specifically about the advice to use separate pom aggregators and parents. I found this site which contains the following paragraph:

What you can see in the module POMs example is that it inherits its version from the parent POM. This is quite natural for small to medium sized projects. The team makes code changes on every module for the next release.

You may use different versions for your modules, but this will not take you very far. If you release the project via its aggregate parent POM, all modules will get released, with their individual version. That's fine – at first thought. If you look closer you will notice that the version will increase, even if some of the modules have not any changes at all. With this approach, having a multi-module aggregate parent POM using different versions for each submodule, you only have the flexibility to decide, if a new version is major, minor or micro . But is this worth the effort?

As far as I know, when you run the release plugin, it will ask for the new versions of each sub-module. If there were no changes made to a particular sub-module, you can decide not to bump its version.

What did the author mean?

在该段中,作者打算强调一个事实,即您无法决定不构建子模块,您唯一可以控制的就是新的开发版本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM