Skip to content

fix: interpolate properties in module/subproject path before filesystem resolution (backport #12734) - #12924

Merged
gnodet merged 2 commits into
apache:maven-4.0.xfrom
gnodet:backport/12734-to-maven-4.0.x
Aug 29, 2026
Merged

fix: interpolate properties in module/subproject path before filesystem resolution (backport #12734)#12924
gnodet merged 2 commits into
apache:maven-4.0.xfrom
gnodet:backport/12734-to-maven-4.0.x

Conversation

@gnodet

@gnodet gnodet commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport of #12734 to maven-4.0.x.

Fixes #12729

…em resolution (apache#12734)

* fix: interpolate properties in module/subproject path before filesystem resolution

* fix: address review feedback for module path interpolation

- Fix property lookup precedence: user → model → system (was inverted)
- Use Interpolator.chain() instead of manual lambda for consistency
- Remove redundant null guard on interpolator.interpolate() result
- Fix comment reference from MNG-XXXX to apache#12729
- Add regression integration test for apachegh-12729

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added this to the 4.0.0-rc-7 milestone Aug 29, 2026
@gnodet gnodet added the bug Something isn't working label Aug 29, 2026
The base class on maven-4.0.x requires a version range constructor
argument and uses File/String instead of Path for extractResources
and newVerifier.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clean backport of #12734 (module/subproject path property interpolation fix) to maven-4.0.x. No issues found.

Backport observations:

  • The interpolation code in DefaultModelBuilder.java is identical between master and this backport — only surrounding line numbers differ due to branch divergence.
  • Integration test correctly adapted to the maven-4.0.x AbstractMavenIntegrationTestCase API:
    • File return type for extractResources() (vs Path on master)
    • String-based newVerifier() (vs Path on master)
    • Mandatory version-range constructor super("[4.0.0-rc-1,)")
  • Interpolator.chain() is already used elsewhere in DefaultModelBuilder on maven-4.0.x (line 2441), confirming API availability.
  • All five findings from the original multi-round review of #12734 (property precedence, Interpolator.chain(), regression test, placeholder reference, null guard) are reflected in the backported code.
  • No backport to maven-3.9.x / maven-3.10.x needed — this is a Maven 4 regression that restores behavior Maven 3 already had.

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

Claude Code on behalf of Guillaume Nodet

@gnodet
gnodet merged commit d2957d8 into apache:maven-4.0.x Aug 29, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants