Skip to content

MavenResourcesExecution.copyOf() drops multiple fields #350

Description

@elharo

The copyOf() method at src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java lines 428–450 omits these fields:

  • flatten (line 113) — controls flattened directory output
  • propertiesEncoding (line 57) — encoding for .properties files
  • delimiters (inherited from AbstractMavenFilteringRequest, line 75) — custom expression delimiter specifications
  • interpolatorCustomizer (inherited from AbstractMavenFilteringRequest, line 84) — custom interpolator consumer

The default constructor calls initDefaults(), which sets delimiters to ["${*}", "@"]. If a caller had configured custom delimiters or the other missing fields, the copy silently loses them. Any code path that creates a defensive copy (e.g., mavenResourcesExecution == null ? new MavenResourcesExecution() : mavenResourcesExecution.copyOf() in BaseFilter line 65) will produce an incomplete copy.

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