apache / apache/maven

[MNG-7222] Validate and warn for naming collisions between Maven and System properties

Open
#8,247 6 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Konrad Windszus](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kwin)** opened **[MNG-7222](https://issues.apache.org/jira/browse/MNG-7222?redirect=false)** and commented

As properties referenced via `${x`} are first being resolved against system properties and only afterwards against Maven properties according to https://maven.apache.org/pom.html#properties. As this is often not noticed such collisions should be detected by Maven and lead to a WARN.

An example for such a collision can be seen at https://github.com/adobe/aem-core-wcm-components/blob/6a294b0483c711a0283474f962a4643234e47c6e/parent/pom.xml#L64 which is never effective as this is always overridden by https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html

At least the mandatory properties (available on all JREs) outlined at https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#getProperties-- should always lead to a WARN.

---
No further details from [MNG-7222](https://issues.apache.org/jira/browse/MNG-7222?redirect=false)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.