slachiewicz opened a new issue, #13357: URL: https://github.com/apache/maven/issues/13357
### Affected version 3.10.0 ### Bug description When Maven 3.10.0 runs embedded through `MavenCli.doMain(String[], String, PrintStream, PrintStream)`, `--color=yes` no longer produces ANSI output. 3.9.x honours it. That is the entry point embedded launchers use, such as maven-executor's `EmbeddedMavenExecutor`. Since the JAnsi to JLine migration in #11874, [`MessageUtils.isColorEnabled()`](https://github.com/apache/maven/blob/maven-3.10.x/maven-jline/src/main/java/org/apache/maven/jline/MessageUtils.java#L119-L121) returns `colorEnabled && terminal != null`. The terminal is only installed by `MessageUtils.systemInstall()` in [`MavenCli.main(String[], ClassWorld)`](https://github.com/apache/maven/blob/maven-3.10.x/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L214-L223). [`doMain`](https://github.com/apache/maven/blob/maven-3.10.x/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L236) never installs it, so `setColorEnabled(true)` from `--color=yes` has no effect there. apache/maven-executor runs the same test against both versions. `defaultFs3CaptureOutputWithForcedColor` passes on 3.9.16 and fails on 3.10.0 with `No ANSI codes present`, for the embedded executor only; the forked executor passes on both. See https://github.com/apache/maven-executor/pull/62. -- 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]
