I know that you cannot inherit two parent POMs, but I need to get around a situation where I would need just that.
In short, the situation is: Company A requires every project to use the company parent POM. Some plugins/configurations are essential so that the resulting artifacts can be used on company servers. Company A now has several projects built upon a framework of company B. Unfortunately, company B does not only provide dependencies and plugins, but needs the company B parent POM to build correctly.
So obviously, we would need a merge of two parent POMs, and not just once, but continuously with the parent POMs of company A and company B evolving over time. Maven does not provide a mechanism for this.
I wonder what would be a good solution. My best idea so far is to put essential parts of one parent POM into a profile and write a script or Maven plugin that copies this profile from one parent POM to the other. Maybe it would also be feasible to add the profile through a Maven extension, but I have never written one.
But maybe there is a good solution for the problem above, and I have just overlooked it. Can you provide one?