efegokdemir opened a new pull request, #13387:
URL: https://github.com/apache/maven/pull/13387

   Fixes #13380.
   
   `AnsiConsole.systemInstall()` wraps both standard streams around the 
terminal output. Maven attaches that terminal to stdout, so 
`-Dorg.slf4j.simpleLogger.logFile=System.err` still sent logs to stdout.
   
   Keep the original stderr stream after JLine installs its wrappers and 
restore it again during uninstall. The regression test checks that both 
installation and cleanup preserve stderr.
   
   ### Tests
   
   - `mvn -pl maven-embedder,maven-jline -Dtest=MavenCliTest,MessageUtilsTest 
-Dsurefire.failIfNoSpecifiedTests=false -am test` — passed (19 tests).
   - `mvn -Prun-its verify` — passed. The 3.10.x branch has no `run-its` 
profile, so this ran the full default verify lifecycle without the separate 
Core IT suite.
   - `mvn -pl apache-maven -am -DskipTests package` — passed.
   - `mvn -pl maven-jline spotless:check` and `git diff --check` — passed.
   - The new regression test failed before the fix because `System.err` became 
JLine's `AnsiPrintStream`; it passes with this change. A packaged CLI run now 
sends 593 bytes to stderr and none to stdout with the property, while default 
logging remains on stdout.
   
   ### Checklist
   
   - [x] Your pull request should address just one issue, without pulling in 
other changes.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
   - [x] Run `mvn verify` to make sure basic checks pass.
   - [ ] You have run the Core ITs successfully. The Core IT suite is not 
present in this 3.10.x checkout.
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0).
   


-- 
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