slawekjaranowski commented on code in PR #195:
URL: https://github.com/apache/maven-verifier/pull/195#discussion_r2929653199


##########
src/main/java/org/apache/maven/shared/verifier/Verifier.java:
##########
@@ -327,6 +327,62 @@ public Verifier(String basedir, String settingsFile, 
boolean debug, String maven
         setMavenHome(mavenHome);
     }
 
+    /**
+     * Builder for creating {@link Verifier} instances with explicit 
configuration.
+     * <p>
+     * When {@link #localRepository(String)} is set, the local repository is 
pre-populated
+     * before {@code findLocalRepo()} runs, so the system property
+     * {@code maven.repo.local} is never consulted. This eliminates the race 
condition that
+     * occurs when multiple {@code Verifier} instances are constructed 
concurrently in the
+     * same JVM while {@link Embedded3xLauncher#run} is manipulating the 
JVM-global system
+     * properties table ({@code System.setProperties(null)}).
+     */
+    public static class Builder {
+        private final String basedir;
+        private String settingsFile;
+        private String localRepository;

Review Comment:
   I would like to add also `forkMode` and `forkJvm` to builder



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to