apache / apache/maven-resources-plugin

[MRESOURCES-300] filter with properties file and with pom properties

Open
#306 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
61
Forks
36
Avg merge
1d 1h
Merged PRs (30d)
3

Description

**[Ernst Reissner](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ernstreissner)** opened **[MRESOURCES-300](https://issues.apache.org/jira/browse/MRESOURCES-300?redirect=false)** and commented

My intention is to filter with a filter properties file and with the properties from pom.
The properties file was for the defaults
and the pom to override.
To that end, I wanted to filter with pom first, i.e. without properties file
to an intermediate place and then further with a properties file.

If a property occurs in the pom, then the first filter step yields the right value
and is not affected by the second step.
If it does not occur in the pom then only the second step, applying the properties file affects it.

Now I found out, that seemingly, even in presence of a properties file the pom affects filtering.
Fortunately, the pom seems to be applied first
so i do not need a second step.
My problem is just that I use an undocumented feature.
Also it worked a bit by accident.
I would suggest to offer a way to configure when the pom is applied, first or last,
or to document, that the pom is always applied first,
which means that it overwrites other occurance.
I feel also that this mechanism is worth being mentioned: if one and the same property occurs several times, the first occurance overwrites the ohers.

Some suggestion to improve usability is to add an example of filtering with properties file in goal copy-resouces, as it is really different from goal resources.

---

**Affects:** 3.3.1

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.