On 7/30/2023 7:34 PM, Nick Stolwijk wrote:
I am missing the purpose of publishing the parent pom. Is it because other
projects can inherit of it,

Yes.

or is it because your own projects (that you
want to be published) are inherited from it?

Yes.

In the second case, you can use the maven-flatten-plugin to have the
published projects not be dependent on your parent project. In that case
you can use the parent projects <pluginManagement> to setup the
configuration and activate it in the child modules in the build section. If
you enable the maven-flatten-plugin in the parent project for each child
project there is no project inheritance anymore in the published artifacts,
so there is no need to publish your parent pom.

I confess I don't know much about the Maven Flatten Plugin, but it sounds suspiciously like the Maven Shade Plugin, which Seemed Like A Good Idea At The Time To Muck With Everything, but from much personal experience the details bring nothing but pain and suffering.

So if I flatten everything, how do I publish a BOM of my multimodule aggregate subprojects without bringing in project-specific dependencies that shouldn't go in the BOM?

I don't want to dismiss suggestions too quickly if I don't fully understand them, but sincerely, just the idea sound like it would bring lots of tears for years and years.

Garret


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to