gnodet opened a new pull request, #11360: URL: https://github.com/apache/maven/pull/11360
## Problem When running integration tests, we see duplicate and confusing output like: ``` [INFO] [stdout] Running integration tests for Maven 4.0.0-rc-4 [INFO] [stdout] using Maven executable: mvn [INFO] [stdout] with verifier.forkMode: AUTO [INFO] [stdout] Running integration tests for Maven 4.1.0-SNAPSHOT [INFO] [stdout] using Maven executable: mvn [INFO] [stdout] with verifier.forkMode: AUTO [INFO] [stdout] Running integration tests for Maven 4.1.0-SNAPSHOT [INFO] [stdout] using Maven executable: mvn [INFO] [stdout] with verifier.forkMode: AUTO ``` The first line shows the wrong version (from the outer Maven process), and the subsequent lines are redundant output from forked JVMs. ## Root Cause The `TestSuiteOrdering` static block was printing Maven version information every time the class was loaded, which happens: 1. Once in the outer Maven process (showing incorrect version 4.0.0-rc-4) 2. Multiple times in forked JVMs (showing correct version 4.1.0-SNAPSHOT but redundantly) ## Solution 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 like `MavenITmng3652UserAgentHeaderTest`) - ✅ Still writes version info to `target/info.txt` for debugging - ❌ Removes the problematic console output ## Benefits - Eliminates confusing duplicate output during integration test execution - Fixes incorrect version display from outer Maven process - Maintains all functionality that tests actually depend on - Simpler, cleaner code ## Testing The change preserves all existing functionality while removing only the problematic console output. Integration tests will continue to work as before, just without the duplicate version messages. ### Files Changed - `its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java` --- Pull Request opened by [Augment Code](https://www.augmentcode.com/) with guidance from the PR author -- 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]
