gnodet opened a new pull request, #14024: URL: https://github.com/apache/maven/pull/14024
## Summary - **Defer LineReader creation** until first prompt — most builds never prompt, so the reader is never needed - **Lazy color auto-detection** — `isColorEnabled()` resolves from `terminal.getType()` on first access instead of blocking on `DeferredTerminal` during startup - **Remove `AnsiConsole.systemInstall()` wrapping** of `System.out` — the terminal writer handles ANSI natively; `AnsiConsole.setTerminal()` is still called in `onComplete` so plugins calling `AnsiConsole.out()` reuse Maven's terminal - **Remove `awaitTerminalInitialization()`** and `terminalReady` future — no longer needed without AnsiConsole synchronization - **Unify terminal creation** into `systemInstall(Consumer<TerminalBuilder>, boolean)` — embedded builds synchronously, non-embedded uses `buildDeferred()` - **Move Windows Ctrl+C handler** into `MessageUtils` (was in `LookupInvoker`) - **Move `helpOrVersionAndMayExit()` before `doConfigureWithTerminal()`** so `mvn -v` output is not wrapped with `[INFO] [stdout]` prefix - **Add `maven.terminal.deferred` system property** (default `true`) as escape hatch to disable deferred terminal build - **Collapse `LookupInvoker.createTerminal()`** from two branches to one Net result: `doConfigureWithTerminal()` no longer blocks on the `DeferredTerminal`. The terminal build happens fully in the background. The first implicit block is `JlineMessageBuilder.build()` when rendering the first styled log message — by which time the background build is done. Follow-up JLine improvements tracked in https://github.com/jline/jline3/issues/2443. ## Test plan - [x] Unit tests pass (`impl/maven-jline`, `impl/maven-cli`, `compat/maven-embedder`) - [x] Integration tests pass (`its/core-it-suite` with `-Prun-its,embedded`) - [ ] Verify `mvn -v` output has no `[INFO] [stdout]` prefix - [ ] Verify `mvn -v --color=always` produces colored output - [ ] Verify `-Dmaven.terminal.deferred=false` works as fallback 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
