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 cd72eaa0f javadoc: improve description of systemPropertyVariables and 
systemPropertiesFile
cd72eaa0f is described below

commit cd72eaa0f1e2c2c8d41e643ae5bcfbcb4e36f8ed
Author: Konrad Windszus <k...@apache.org>
AuthorDate: Tue Jul 9 11:22:04 2024 +0200

    javadoc: improve description of systemPropertyVariables and
    systemPropertiesFile
    
    clarify order of precedence
---
 .../apache/maven/plugin/failsafe/IntegrationTestMojo.java   |  5 +++++
 .../apache/maven/plugin/surefire/AbstractSurefireMojo.java  | 13 ++++++++++++-
 .../org/apache/maven/plugin/surefire/SurefirePlugin.java    |  5 +++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git 
a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
 
b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
index abd737e1e..a15301ef4 100644
--- 
a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
+++ 
b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
@@ -525,6 +525,11 @@ public class IntegrationTestMojo extends 
AbstractSurefireMojo {
     @Parameter(property = "failsafe.enableProcessChecker")
     private String enableProcessChecker;
 
+    /**
+     * Properties file being used as system properties passed to the provider.
+     *
+     * @see AbstractSurefireMojo#systemPropertyVariables {@code 
systemPropertyVariables} for how the effective provider properties are 
calculated
+     */
     @Parameter(property = "failsafe.systemPropertiesFile")
     private File systemPropertiesFile;
 
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 4c98873fe..47d691a13 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
@@ -314,7 +314,8 @@ public abstract class AbstractSurefireMojo extends 
AbstractMojo implements Suref
     /**
      * List of System properties to pass to a provider.
      *
-     * @deprecated Use systemPropertyVariables instead.
+     * @deprecated Use {@link #systemPropertyVariables} instead.
+     * @see #systemPropertyVariables {@code systemPropertyVariables} for how 
the effective provider properties are calculated
      */
     @Deprecated
     @Parameter
@@ -322,8 +323,18 @@ public abstract class AbstractSurefireMojo extends 
AbstractMojo implements Suref
 
     /**
      * List of System properties to pass to a provider.
+     * The effective system properties given to a provider are contributed 
from several sources:
+     * <ol>
+     * <li>{@link #systemProperties}</li>
+     * <li>{@link AbstractSurefireMojo#getSystemPropertiesFile()} (set via 
parameter {@code systemPropertiesFile} on some goals)</li>
+     * <li>{@link #systemPropertyVariables}</li>
+     * <li>User properties from {@link MavenSession#getUserProperties()}, 
usually set via CLI options given with {@code -D}</li>
+     * </ol>
+     * Later sources may overwrite same named properties from earlier sources, 
that means for example that one cannot overwrite user properties with either
+     * {@link #systemProperties}, {@link 
AbstractSurefireMojo#getSystemPropertiesFile()} or {@link 
#systemPropertyVariables}.
      *
      * @since 2.5
+     * @see #systemProperties
      */
     @Parameter
     private Map<String, String> systemPropertyVariables;
diff --git 
a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
 
b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
index addc8834a..e2d9789f4 100644
--- 
a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
+++ 
b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
@@ -502,6 +502,11 @@ public class SurefirePlugin extends AbstractSurefireMojo 
implements SurefireRepo
     @Parameter(property = "surefire.enableProcessChecker")
     private String enableProcessChecker;
 
+    /**
+     * Properties file being used as system properties passed to the provider.
+     *
+     * @see AbstractSurefireMojo#systemPropertyVariables {@code 
systemPropertyVariables} for how the effective provider properties are 
calculated
+     */
     @Parameter(property = "surefire.systemPropertiesFile")
     private File systemPropertiesFile;
 

Reply via email to