用于合并pom的Maven插件。xml文件

时间:2023-01-20 21:44:28

We have a parent Maven project (agregator) and some daughter projects:

我们有一个父Maven项目(agregator)和一些子项目:

parent/
  child1/
  child2/
  ...

Now we want convert that structure to one project and we need to merge pom.xml files together. The problem is that projects have very complicated pom.xml files with many configurations (lifecycle phases, platform specific settings, goals, etc..) and long lists of dependencies. Manual merging will be complicated and error-prone.

现在我们要把这个结构转换成一个项目,我们需要合并pom。xml文件。问题是项目的pom非常复杂。具有多种配置的xml文件(生命周期阶段、平台特定设置、目标等)和依赖项的长列表。人工合并将会变得复杂且容易出错。

Does someone know any Maven plugin for merging pom.xml files ?

是否有人知道什么Maven插件可以合并pom。xml文件吗?

2 个解决方案

#1


1  

Maybe the "shade" plugin can help: http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html

也许“阴影”插件可以提供帮助:http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html。

#2


0  

I have developed such one for my purposes, called uber-pom, it has been published in maven central https://github.com/raydac/uber-pom

我为我的目的开发了这样一种工具,叫做uber-pom,它已经在maven central https://github.com/raydac/uber-pom中发布。

#1


1  

Maybe the "shade" plugin can help: http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html

也许“阴影”插件可以提供帮助:http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html。

#2


0  

I have developed such one for my purposes, called uber-pom, it has been published in maven central https://github.com/raydac/uber-pom

我为我的目的开发了这样一种工具,叫做uber-pom,它已经在maven central https://github.com/raydac/uber-pom中发布。