Skip to content

Keep versions in sync across POM files #4679

Open

Description

@johnclc

The Maven reactor repeats its project version in multiple POM.xml files and versions are currently hardcoded to match the release e.g. 4.3.0 or 4.4.0-SNAPSHOT for local development. When the version changes, child POMs that declare a <parent> must be updated to match. This is easy to miss, especially for custom modules or bundles maintained alongside the upstream project.

The suggested fix is to adopt Maven's CI friendly version feature across the reactor:

  • Define a default <revision> in the top-level aggregator POM.
  • Use ${revision} for the aggregator's project version and for in-repository <parent><version> references that should follow it.
  • Make the same update for nested aggregators and their child parent references.

Here is a link to the official Maven documentation: https://maven.apache.org/guides/mini/guide-maven-ci-friendly.html

Adopting a centralized ${revision} property establishes a single source of truth for the project version, which streamlines the release process and eliminates the risk of out-of-sync child modules. This can be overridden during the package step by using -Drevision=my-custom-version if there is ever a need to use a different version label.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions