Fix mvnup to replace deprecated ${basedir} in repository URLs#12105
Open
gnodet wants to merge 1 commit into
Open
Fix mvnup to replace deprecated ${basedir} in repository URLs#12105gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
Maven 4 validates that repository URLs are fully interpolated (MNG-8677, PR #2158). When a POM uses ${basedir} or ${pom.basedir} in repository URLs, this can fail validation since these are deprecated forms that may not be interpolated in all contexts. The compatibility fix strategy now replaces ${basedir} and ${pom.basedir} with the canonical ${project.basedir} form in repository and pluginRepository URL elements, including those inside profiles. See: gnodet/maven4-testing#13299 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
gnodet
added a commit
that referenced
this pull request
May 19, 2026
…y URLs (#12105) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
CompatibilityFixStrategy.fixRepositoryExpressions()to actually replace deprecated${basedir}and${pom.basedir}with the canonical${project.basedir}form in repository and pluginRepository URL elements (including inside profiles)fixedwas never set totrue)Context
Maven 4 introduced
MavenValidator(MNG-8677, PR #2158) which validates that repository URLs are fully interpolated. When a POM uses${basedir}in a repository URL (e.g.file://${basedir}/internal-repository), this can fail validation since${basedir}is a deprecated form that may not be interpolated in all contexts (notably during transitive dependency resolution).The
pom.prefix was deprecated in favor ofproject.(MNG-7244), and prefixless expressions were dropped (MNG-7404).See: gnodet/maven4-testing#13299
Test plan
CompatibilityFixStrategyTesttests pass${basedir}→${project.basedir}replacement in repository, pluginRepository, and profile repository URLs${project.basedir}or contain no expressionsClaude Code on behalf of Guillaume Nodet