[ https://issues.apache.org/jira/browse/SUREFIRE-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878535#comment-17878535 ]
Falko Modler commented on SUREFIRE-2258: ---------------------------------------- [~kwin] thanks for the link. However, I do need to pass properties explicitly for the following cases: - {{-D...}} in {{.mvn/jvm.config}} - or property only defined in {{pom.xml}} (e.g. a default value that shall be overridable) {{-D...}} directly on the command line or via {{MAVEN_ARGS}} do both work without {{systemProperties}}, as you say. So if I want to cover all cases I have to use the placeholder approach, no? > Wrongly complains about system property overwritten by user property when > using placeholder > ------------------------------------------------------------------------------------------- > > Key: SUREFIRE-2258 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2258 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 3.4.0 > Environment: Apache Maven 3.9.9 > (8e8579a9e76f7d015ee5ec7bfcdc97d260186937) > Maven home: /home/famod/.sdkman/candidates/maven/3.9.9 > Java version: 21.0.4, vendor: BellSoft, runtime: > /home/fmo/.sdkman/candidates/java/21.0.4-librca > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux", version: "5.15.0-119-generic", arch: "amd64", family: "unix" > Reporter: Falko Modler > Priority: Major > > After SUREFIRE-1385 the plugin is complaining with: > {quote}[WARNING] System property [sha1] overwritten by user properties from > Maven session > {quote} > when using: > {code:xml} > <systemProperties> > <!-- pass on all "dynamic" version segments for Maven bootstrapping in > @QuarkusTest --> > <sha1>${sha1}</sha1> > </systemProperties> > {code} > 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]): > {code:xml} > <version>${revision}.${changelist}${sha1} > {code} > and in project properties: > {code:xml} > <sha1></sha1> <!-- can be used locally as a discriminator to keep multiple > clones separated, e.g. via .envrc (direnv): export MAVEN_ARGS="-Dsha1=-dev1" > --> > {code} > And in [direnv|https://direnv.net/] {{.envrc}} I have: > {code:java} > export MAVEN_ARGS="-Dsha1=-dev1" > {code} > (or dev2, dev3 etc., depending on the clone) -- This message was sent by Atlassian Jira (v8.20.10#820010)