This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push:
new cfe85b929 Clarify how late placeholder replacement (@{...}) deals with
unresolvable parameters
cfe85b929 is described below
commit cfe85b929f48b3cac6963a94a084c5eebbd024aa
Author: Konrad Windszus <[email protected]>
AuthorDate: Thu Oct 23 11:29:46 2025 +0200
Clarify how late placeholder replacement (@{...}) deals with
unresolvable parameters
Also outline that this syntax is only necessary for property values
which are modified, not for those which are exclusively set through
other plugins due to how resolving works for plugin parameters
(org.apache.maven.plugin.PluginParameterExpressionEvaluator)
---
.../org/apache/maven/plugin/surefire/AbstractSurefireMojo.java | 10 ++++++++--
maven-surefire-plugin/src/site/fml/faq.fml | 6 +++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index f7ffb6581..5e81223e3 100644
---
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -447,9 +447,15 @@ public abstract class AbstractSurefireMojo extends
AbstractMojo implements Suref
* Arbitrary JVM options to set on the command line. Only effective for
forked executions.
* <br>
* <br>
- * Since the Version 2.17 using an alternate syntax for {@code argLine},
<b>@{...}</b> allows late replacement
- * of properties when the plugin is executed, so properties that have been
modified by other plugins will be picked
+ * Using an alternate syntax for placeholders in {@code argLine}, namely
<code>@{...}</code> allows late replacement
+ * of properties when the plugin is executed, so properties that have been
<i>modified</i> by other plugins will be picked
* up correctly.
+ * In contrast to the standard Maven property replacement the
<code>@{...}</code> placeholder is replaced by the empty string if the
referenced
+ * propery cannot be found.
+ * <br>
+ * <i>This mechanism is only necessary for properties which are modified
i.e. also available with a different value at initialization of the
+ * POM model. Otherwise standard Maven property replacement kicks in
properly directly before this goal is being executed (instead of when the POM
model is being resolved)</i>.
+ * <br>
* See the Frequently Asked Questions page with more details:<br>
* <a
href="http://maven.apache.org/surefire/maven-surefire-plugin/faq.html">
* http://maven.apache.org/surefire/maven-surefire-plugin/faq.html</a>
diff --git a/maven-surefire-plugin/src/site/fml/faq.fml
b/maven-surefire-plugin/src/site/fml/faq.fml
index ae4e5af7e..f1fca38af 100644
--- a/maven-surefire-plugin/src/site/fml/faq.fml
+++ b/maven-surefire-plugin/src/site/fml/faq.fml
@@ -100,9 +100,13 @@ under the License.
plugin is run. So Surefire would never see the place-holders in its
argLine property.
</p>
<p>
- Since the Version 2.17 using an alternate syntax for these
properties, <pre>@{...}</pre> allows late
+ Using an alternate syntax for these properties, <pre>@{...}</pre>
allows late
replacement of properties when the plugin is executed, so properties
that have been modified by other
plugins will be picked up correctly.
+ In contrast to the standard Maven property replacement the
<code>@{...}</code> placeholder is replaced by the empty string if the
referenced
+ property cannot be found.
+ <i>This mechanism is only necessary for properties which are
modified, i.e. also available with a different value at initialization of the
+ POM model. Otherwise standard Maven property replacement kicks in
properly directly before this goal is being executed (instead of when the POM
model is being resolved)</i>.
</p>
</answer>
</faq>