带bom的Maven多项目结构

时间:2019-08-04 18:34:25

标签: java maven maven-bom

我必须重构使用Maven的Java整体应用程序。当前的应用程序有很多依赖项(我的意思是很多,例如100-150个),许多配置文件和插件。所有这些都将被模块化,并将被集成到GitLab管道中,并带有用于工件的适当存储库。

我检查了许多有关maven和boms的示例。

所以我在考虑这样的结构:

project/BOM/pom.xml              //the only dependency manager for the whole project
project/pom.xml                  //this will be the root pom, and will import the BOM as a <dependency>, as the <parent> is reserved for the Enterprise management.
project/repo1/pom.xml          // this will import the project/pom as the parent.
project/repo1/node1/pom.xml    //this will use the dependencies imported by the BOM module
project/repo1/node2/pom.xml    //same
project/repo2/pom.xml          //same
...
etc.

这是“最佳实践”工业化配置还是Bom应该嵌入主pom内?

我知道应该在回购协议之间分配依赖关系,但是问题是我们有交叉链接的依赖关系,当时我现在不能处理它们。因此,我必须尽可能集中所有它们。

0 个答案:

没有答案