Skip to content

Console modes: --console=plain/rich/verbose/machine - #12697

Draft
gnodet wants to merge 1 commit into
feature/build-reportfrom
feature/console-modes
Draft

Console modes: --console=plain/rich/verbose/machine#12697
gnodet wants to merge 1 commit into
feature/build-reportfrom
feature/console-modes

Conversation

@gnodet

@gnodet gnodet commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Part 3 of the logging feature chain. Depends on #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

# PR Feature
1 #12694 Logging foundation
2 #12695 Build report
3 This PR Console modes
4 #12698 Warning mode + diagnostics
5 #12699 mvnlog viewer
#12702 Structured problems pipeline

Test plan

  • mvn test -pl impl/maven-cli — all 692 tests pass
  • mvn test -pl impl/maven-core — all tests pass
  • CI validation

🤖 Generated with Claude Code

@gnodet
gnodet force-pushed the feature/build-report branch from 602fffb to 056dcf0 Compare August 8, 2026 01:23
@gnodet
gnodet force-pushed the feature/console-modes branch from b0617f7 to 1a419b7 Compare August 8, 2026 01:23
gnodet added a commit that referenced this pull request Aug 8, 2026
Add --warning-mode CLI flag (summary/all/none/fail) for controlling
how build warnings are displayed. Enrich BuilderProblem with key,
suggestion, documentationUrl, INFO severity, and a builder API.
Add DiagnosticReporter service and DefaultDiagnosticCollector for
deduplication across parallel module builds.

Part 4 of the #12572 split (depends on console modes PR #12697).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet
gnodet force-pushed the feature/console-modes branch from 1a419b7 to 1e4c616 Compare August 8, 2026 05:35
@gnodet
gnodet force-pushed the feature/build-report branch 2 times, most recently from a1ee585 to 0f31ce2 Compare August 8, 2026 12:14
@gnodet
gnodet force-pushed the feature/console-modes branch from 1e4c616 to eb4b145 Compare August 8, 2026 12:14
gnodet added a commit that referenced this pull request Aug 8, 2026
Add --warning-mode CLI flag (summary/all/none/fail) for controlling
how build warnings are displayed. Enrich BuilderProblem with key,
suggestion, documentationUrl, INFO severity, and a builder API.
Add DiagnosticReporter service and DefaultDiagnosticCollector for
deduplication across parallel module builds.

Part 4 of the #12572 split (depends on console modes PR #12697).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet
gnodet force-pushed the feature/console-modes branch from eb4b145 to 35cf036 Compare August 8, 2026 19:17
gnodet added a commit that referenced this pull request Aug 8, 2026
Add --warning-mode CLI flag (summary/all/none/fail) for controlling
how build warnings are displayed. Enrich BuilderProblem with key,
suggestion, documentationUrl, INFO severity, and a builder API.
Add DiagnosticReporter service and DefaultDiagnosticCollector for
deduplication across parallel module builds.

Part 4 of the #12572 split (depends on console modes PR #12697).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the --console CLI flag with four output modes:
- plain: compact one-line-per-module output for CI
- rich: JLine status bar with live reactor progress
- verbose: full mojo-level output (current default)
- machine: JSON lines for piping to external tools

Part 3 of the #12572 split (depends on build report PR #12695).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet
gnodet force-pushed the feature/build-report branch from 8083c89 to 170bd72 Compare August 8, 2026 19:35
@gnodet
gnodet force-pushed the feature/console-modes branch from 35cf036 to e06f638 Compare August 8, 2026 19:35
gnodet added a commit that referenced this pull request Aug 8, 2026
Add --warning-mode CLI flag (summary/all/none/fail) for controlling
how build warnings are displayed. Enrich BuilderProblem with key,
suggestion, documentationUrl, INFO severity, and a builder API.
Add DiagnosticReporter service and DefaultDiagnosticCollector for
deduplication across parallel module builds.

Part 4 of the #12572 split (depends on console modes PR #12697).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant