apache / apache/maven-filtering

MavenResourcesExecution.copyOf() drops multiple fields

Open Beginner friendly
#350 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
9
Forks
36
Avg merge
8h 47m
Merged PRs (30d)
4

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read copyOf() in src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java lines 428–450, then inspect the listed fields and BaseFilter line 65 to understand the defensive-copy path. Ensure the copy retains flatten, propertiesEncoding, delimiters, and interpolatorCustomizer, and verify the behavior with the relevant Maven filtering tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.