gnodet opened a new pull request, #12697: URL: https://github.com/apache/maven/pull/12697
## Summary Part 3 of the [#12572](https://github.com/apache/maven/pull/12572) split. Depends on PR #12695 (build report). Adds the `--console` CLI flag with four output modes: - **`plain`** — compact one-line-per-module output, ideal for CI (auto-selected in CI environments) - **`rich`** — JLine status bar with live reactor progress (auto-selected on interactive TTYs) - **`verbose`** — full mojo-level output, current Maven 4.0 default behavior - **`machine`** — JSON lines: one typed JSON object per lifecycle event, designed for piping to external tools Auto-detection (`--console=auto`, the default): CI → plain, interactive TTY → rich, otherwise → verbose. ## Files changed (16 files, ~4000 insertions) | Area | Files | |------|-------| | API | `Options.java` (+`console()`) | | Event loggers | `PlainExecutionEventLogger`, `RichBuildEventListener`, `RichExecutionEventLogger`, `MachineBuildEventListener`, `MachineExecutionEventLogger` | | CLI wiring | `CommonsCliOptions`, `LayeredOptions`, `LookupInvoker` (preliminary interactive detection), `MavenInvoker` (console mode switch + transfer listener) | | Existing logger | `ExecutionEventLogger` (version info on failure) | | Tests | 5 test classes with full coverage | ## PR chain 1. ✅ PR #12694 — Logging foundation (`feature/logging-foundation` → `master`) 2. ✅ PR #12695 — Build report (`feature/build-report` → `feature/logging-foundation`) 3. **This PR** — Console modes (`feature/console-modes` → `feature/build-report`) 4. 🔜 PR — Warning mode + diagnostics 5. 🔜 PR — `mvnlog` viewer ## Test plan - [x] `mvn test -pl impl/maven-cli` — all 692 tests pass - [x] `mvn test -pl impl/maven-core` — all tests pass - [ ] CI validation 🤖 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]
