Skip to content

Migrate to Maven 4 #3780

@ppkarwasz

Description

@ppkarwasz

With the upcoming release of Maven 4.0.0, we should begin evaluating the compatibility of its release candidates with Log4j. Maven 4 introduces several significant changes that are highly relevant to our build and release process.

Key Benefits for Log4j

1. Separation of Build and Consumer POMs

Maven 4 formally introduces a clean separation between the build POM (used during the build process) and the consumer POM (published to Maven Central).

Currently, we use the Flatten Maven Plugin to publish a simplified version of our log4j-bom, which removes build-related metadata and retains only the dependency management section. However, this approach is fragile—stripping too much information can lead to broken or unresolvable artifacts. This has already contributed to several issues, including:

Migrating to Maven 4’s Consumer POM model would eliminate the need for these manual workarounds by making the separation between build and published metadata a first-class feature, managed directly by Maven.

2. CI-Friendly Versioning

Maven 4 introduces support for automatic versioning of submodules in multi-module builds. This would offer a more robust alternative to our current usage of the revision property and Flatten Maven Plugin, further simplifying our build process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions