This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new d749fbca7f Remove duplicate integration test version output (#11360)
d749fbca7f is described below

commit d749fbca7f14000c657c9c7880554db389bd2dba
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Nov 26 16:03:27 2025 +0100

    Remove duplicate integration test version output (#11360)
    
    The TestSuiteOrdering static block was printing Maven version information
    every time the class was loaded, which happened multiple times:
    - Once from the outer Maven process (showing incorrect version)
    - Multiple times from forked JVMs (showing correct but redundant version)
    
    This change removes the console output while preserving essential 
functionality:
    - Still clears system properties for test isolation
    - Still sets maven.version system property (needed by some tests)
    - Still writes version info to target/info.txt for debugging
    
    Fixes the confusing duplicate output during integration test execution.
---
 .../src/test/java/org/apache/maven/it/TestSuiteOrdering.java  | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git 
a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java 
b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
index 224b1e001f..dc173a18a1 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java
@@ -24,8 +24,6 @@
 import java.util.Comparator;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
-import org.apache.maven.cling.executor.ExecutorHelper;
 import org.junit.jupiter.api.ClassDescriptor;
 import org.junit.jupiter.api.ClassOrderer;
 import org.junit.jupiter.api.ClassOrdererContext;
@@ -60,19 +58,12 @@ private static void infoProperty(PrintStream info, String 
property) {
             System.clearProperty("maven.conf");
             System.clearProperty("classworlds.conf");
 
+            // Set maven.version system property (needed by some tests)
             Verifier verifier = new Verifier("", false);
             String mavenVersion = verifier.getMavenVersion();
-            String executable = verifier.getExecutable();
-            ExecutorHelper.Mode defaultMode = verifier.getDefaultMode();
-
-            System.out.println("Running integration tests for Maven " + 
mavenVersion + System.lineSeparator()
-                    + "\tusing Maven executable: " + executable + 
System.lineSeparator()
-                    + "\twith verifier.forkMode: " + defaultMode);
-
             System.setProperty("maven.version", mavenVersion);
 
             String basedir = System.getProperty("basedir", ".");
-
             try (PrintStream info = new 
PrintStream(Files.newOutputStream(Paths.get(basedir, "target/info.txt")))) {
                 infoProperty(info, "maven.version");
                 infoProperty(info, "java.version");

Reply via email to