Skip to content

Replace custom GraphLogger with DependencyGraphDumper in dependency resolution - #12639

Merged
slawekjaranowski merged 1 commit into
apache:maven-3.10.xfrom
slawekjaranowski:rm-graphlogger
Jul 30, 2026
Merged

Replace custom GraphLogger with DependencyGraphDumper in dependency resolution#12639
slawekjaranowski merged 1 commit into
apache:maven-3.10.xfrom
slawekjaranowski:rm-graphlogger

Conversation

@slawekjaranowski

Copy link
Copy Markdown
Member

Refactored the dependency graph logging by removing the custom GraphLogger implementation in both DefaultProjectDependenciesResolver and DefaultPluginDependenciesResolver and replacing it with DependencyGraphDumper.

Simplifies code and leverages existing utility for consistent logging.

…cy resolution

Refactored the dependency graph logging by removing the custom `GraphLogger` implementation
in both `DefaultProjectDependenciesResolver` and `DefaultPluginDependenciesResolver`
and replacing it with `DependencyGraphDumper`.

Simplifies code and leverages existing utility for consistent logging.
@slawekjaranowski

Copy link
Copy Markdown
Member Author

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean refactoring that removes ~166 lines of duplicated custom GraphLogger inner classes from both DefaultProjectDependenciesResolver and DefaultPluginDependenciesResolver, replacing them with the library-provided DependencyGraphDumper from maven-resolver-util (already a dependency).

This is a good change:

  • The two GraphLogger classes had "Keep this class in sync with..." comments, indicating a recognized maintenance burden. This duplication is now eliminated.
  • DependencyGraphDumper provides richer diagnostic output (tree-style indentation, range membership, conflict winner info) consistent with how Maven 4's impl/maven-core already uses the same DependencyGraphDumper(logger::debug) pattern.
  • The minor format differences (tree-style +-/\-/| instead of 3-space indent, [scope] instead of :scope) are improvements to diagnostic output, not a public API contract.
  • No tests exist for the old debug graph logging, which is expected — this is diagnostic output.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

@slawekjaranowski
slawekjaranowski merged commit 9e30708 into apache:maven-3.10.x Jul 30, 2026
18 checks passed
@slawekjaranowski
slawekjaranowski deleted the rm-graphlogger branch July 30, 2026 20:46
@github-actions github-actions Bot added this to the 3.10.0 milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants