Skip to content

EffectivePomMojo.cleanModel() mutates the live project Model in-place #384

Closed

Description

@elharo

In src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java:210-213:

private static void cleanModel(Model pom) {
Properties properties = new SortedProperties();
properties.putAll(pom.getProperties());
pom.setProperties(properties);
}

Called from writeEffectivePom() at line 182 on project.getModel(). This permanently replaces the project Properties with a SortedProperties instance, altering property iteration order for the remainder of the build. This is a data corruption side effect in what should be a read-only display operation.

Activity

  1. added
    bug
    on Jul 1, 2026
  2. Neil-Tomar commented on Aug 6, 2026

    @Neil-Tomar
    Contributor

    I’d like to take this issue. Is anyone working on it?

  3. elharo commented on Aug 7, 2026

    @elharo
    ContributorAuthor

    not as far as I know

  4. added 2 commits that reference this issue on Aug 9, 2026
  5. added 2 commits that reference this issue on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions