mvnlog: build log viewer, integration tests, script routing - #12699
Open
gnodet wants to merge 1 commit into
Open
mvnlog: build log viewer, integration tests, script routing#12699gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
gnodet
force-pushed
the
feature/warning-mode
branch
from
August 8, 2026 01:23
0cc76eb to
6124231
Compare
This was referenced Aug 8, 2026
gnodet
force-pushed
the
feature/warning-mode
branch
2 times, most recently
from
August 8, 2026 12:14
dc3bccd to
a7c83db
Compare
gnodet
force-pushed
the
feature/warning-mode
branch
from
August 8, 2026 19:17
a7c83db to
7243fd7
Compare
gnodet
force-pushed
the
feature/warning-mode
branch
from
August 8, 2026 19:35
7243fd7 to
af945c2
Compare
gnodet
force-pushed
the
feature/warning-mode
branch
from
August 8, 2026 21:48
af945c2 to
850a04c
Compare
gnodet
force-pushed
the
feature/mvnlog
branch
2 times, most recently
from
August 8, 2026 21:57
9924a43 to
4d7e49f
Compare
4 tasks
- mvnlog / mvnlog --json CLI viewer for build-report JSON files - BuildReportRenderer with ANSI colors, timing, failure details - SimpleJsonReader dependency-free streaming JSON parser - mvn --log routes to MavenLogCling, mvnlog shell scripts - MavenITgh12571BuildReportTest: 8 ITs covering build report, console modes, warning mode, version info on failure, and mvnlog viewer
gnodet
force-pushed
the
feature/warning-mode
branch
from
August 9, 2026 08:11
850a04c to
5913a2b
Compare
gnodet
marked this pull request as ready for review
August 9, 2026 08:11
gnodet
commented
Aug 9, 2026
gnodet
left a comment
Contributor
Author
There was a problem hiding this comment.
Well-structured mvnlog tool that follows established Maven tool patterns. Two minor polish items noted after verification (three other findings about shell script flag stripping and JSON parser depth were false positives).
Also noted:
- The zero-dependency JSON reader/writer approach is sound — no JSON library exists in maven-cli's dependency tree.
- The 11 existing IT modifications adding
--console=verboseare necessary for the new console mode system. - Strong test coverage with 12 integration test cases.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
| } | ||
| } | ||
|
|
||
| private List<Completer> mvnlogCompleter(String name) { |
Contributor
Author
There was a problem hiding this comment.
The tab-completer only offers --diagnostics, --failures, --full, --list but is missing 5 of the 9 supported options: --json, --module, --mojo, --level, --grep. This reduces discoverability in mvnsh.
Suggested change
| private List<Completer> mvnlogCompleter(String name) { | |
| private List<Completer> mvnlogCompleter(String name) { | |
| return List.of(new ArgumentCompleter(new StringsCompleter( | |
| "--diagnostics", "--failures", "--full", "--list", "--json", | |
| "--module", "--mojo", "--level", "--grep"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 5 of the logging feature chain. Depends on #12698 (warning mode).
Adds the
mvnlogtool — a CLI viewer for build-report JSON files — plus integration tests for the entire feature set and script routing.mvnlog viewer
mvnlog/mvnlog --json— view the latest build report as human-readable or raw JSONBuildReportRenderer— renders reports with ANSI colors, timing, failure detailsSimpleJsonReader— dependency-free streaming JSON parserLogInvoker/LogParser/LogContext— invoker chain for the toolCommonsCliLogOptions/LogOptions— CLI option parsingMavenLogCling— entry point classScript routing
mvn --logroutes toMavenLogCling(bothmvnandmvn.cmd)--logfrom colliding with--log-fileprefix matchingmvnlog/mvnlog.cmdshell scripts for direct invocationcomponent.xmlupdated to includemvnlogin the distributionIntegration tests
MavenITgh12571BuildReportTest— 8 IT tests covering build report JSON, console modes (plain/machine/verbose), warning mode, version info on failure, and mvnlog viewer--console=verboseto preserve expected output formatFiles changed (36 files, ~2500 insertions)
Tools.java,LogOptions,ParserRequestMavenLogClingLogInvoker,LogParser,LogContext,CommonsCliLogOptionsBuildReportRenderer,SimpleJsonReaderBuiltinShellCommandRegistryFactory(mvnlog command)mvn,mvn.cmd,mvnlog,mvnlog.cmd,component.xmlCommonsCliOptions(+--logconstant/option)BuildReportRendererTest,SimpleJsonReaderTestMavenITgh12571BuildReportTest+ 11 existing ITs + 4 resource POMsPR chain
mvnlogviewerTest plan
mvn compile— clean compilemvn test -pl impl/maven-cli— all tests pass🤖 Generated with Claude Code