apache / apache/maven-surefire

[SUREFIRE-2258] Wrongly complains about system property overwritten by user property when using placeholder

Open
#2,643 5 comments 1 reaction 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Falko Modler](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=famod)** opened **[SUREFIRE-2258](https://issues.apache.org/jira/browse/SUREFIRE-2258?redirect=false)** and commented

After SUREFIRE-1385 the plugin is complaining with:

> [WARNING] System property [sha1] overwritten by user properties from Maven session

when using:

```xml


${sha1}

```

This warning looks wrong to me in this case because I'm explicitly using a placeholder, not a static value.

For context, I'm setting as project version (["CI friendly"](https://maven.apache.org/maven-ci-friendly.html)):

```xml
${revision}.${changelist}${sha1}
```

and in project properties:

```xml

```

And in [direnv](https://direnv.net/) `.envrc` I have:

```java
export MAVEN_ARGS="-Dsha1=-dev1"
```

(or dev2, dev3 etc., depending on the clone)

---

**Affects:** 3.4.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Maven configuration shown for SUREFIRE-2258, including the ${sha1} placeholder and the user property from MAVEN_ARGS, then compare the warning behavior introduced by SUREFIRE-1385. Done means the plugin no longer reports an overwrite for this placeholder-based configuration while preserving the expected behavior for genuinely static values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.