Fix #11973: Restore backward-compatible DefaultToolchain constructor#12238
Open
gnodet wants to merge 1 commit into
Open
Fix #11973: Restore backward-compatible DefaultToolchain constructor#12238gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
…uctor Add deprecated constructors accepting org.codehaus.plexus.logging.Logger to maintain binary compatibility with custom toolchain implementations compiled against Maven 3.x. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hboutemy
approved these changes
Jun 5, 2026
Member
hboutemy
left a comment
There was a problem hiding this comment.
tested with maven-toolchain-plugin: it fixes the issue
very good, small fix
thanks
slachiewicz
approved these changes
Jun 6, 2026
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
Fixes #11973
Custom toolchain implementations compiled against Maven 3.x call
DefaultToolchain(ToolchainModel, String, org.codehaus.plexus.logging.Logger), which was removed when Maven 4 switched to SLF4J. This causesNoSuchMethodErrorat runtime.This PR adds two deprecated backward-compatible constructors that accept the old Plexus
Loggerparameter and delegate to the existing SLF4J-based constructors.See also: apache/maven-toolchains-plugin#152
Test plan
mvn install -DskipTestsbuilds successfullyuse-custom-toolchain)🤖 Generated with Claude Code