Search code examples
maven-3project-structureparent-pom

Where should I keep my company's parent POM?


We have a root POM in one of our project which more and more people consume. So we're now considering to extract this into a real parent POM (i.e. without <modules> and specific build commands).

Now the question is where should this new parent POM go? I see two options:

  1. A new project
  2. Into a folder parent/ inside of the framework project.

I looked at Maven and it uses a distinct project for the parent POM (here is the latest release).

But that means the relativePath is most often wrong (I really don't want developers to have to checkout the parent POM with this approach).

What are the differences/advantages/drawbacks of the two approaches?


Solution

  • The simple reason having a separate project for such company pom is based on the release cycle of such a pom cause it's different of all other projects/artifacts within the different projects. A release is necessary to have a released version which means a defined state of the company pom. This release is simply being deployed into your company repository manager and can be consumed by many projects. During the time updates are comming in like plugin updates etc. so you can decide making a new release of your company pom. And the different projects can decide to pick the update by simply changing the version or not.