Skip to content

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions