You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/10/05 21:55:29 UTC
[I] Embedded MavenCli.doMain ignores --color=yes in 3.10.0 [maven]
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: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Embedded MavenCli.doMain ignores --color=yes in 3.10.0 [maven]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz closed issue #13357: Embedded MavenCli.doMain ignores --color=yes in 3.10.0
URL: https://github.com/apache/maven/issues/13357
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org