Adapt ITs for restricted interpolation of repository-resolved models - #440
Merged
gnodet merged 1 commit intoSep 3, 2026
Merged
Conversation
gnodet
force-pushed
the
fix/restricted-interpolation-system-path
branch
5 times, most recently
from
September 3, 2026 09:22
45d7925 to
8695d55
Compare
Maven 3.10.x commit 03c947d820 restricts property interpolation for
models built at VALIDATION_LEVEL_MINIMAL (dependency, parent and
BOM-import POMs). User, system and environment properties are no
longer resolved in those models by default.
Each of the 4 affected ITs (IT0085, MNG-3586, MNG-4379, MNG-4590) is
updated with:
1. A version-gated branch in the original test method: on 3.10.0-rc-1
or earlier, the test expects the old behavior (full interpolation
without opt-out); on later versions, it verifies that the build
fails without the opt-out flag.
2. A new test method that explicitly passes
-Dmaven.model.dependencyInterpolation.full=true and verifies the
opt-out works correctly on all versions.
Since AbstractMavenIntegrationTestCase.removePattern() strips RC
qualifiers (both rc-1 and rc-2 become 3.10.0), the version guard
uses a combination of getMavenVersion().toString().equals("3.10.0-rc-1")
and matchesVersionRange("(,3.10.0)") to correctly distinguish rc-1
from later versions.
gnodet
force-pushed
the
fix/restricted-interpolation-system-path
branch
from
September 3, 2026 11:44
8695d55 to
c6c5eb0
Compare
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.
Maven 3.10.x commit 03c947d820 restricts property interpolation for models built at
VALIDATION_LEVEL_MINIMAL(dependency, parent and BOM-import POMs). User, system and environment properties are no longer resolved in those models by default.The existing integration tests for system-scope dependencies in repository-resolved models were not updated to account for this new behavior, causing 4 ITs to fail:
MavenIT0085TransitiveSystemScopeTestMavenITmng3586SystemScopePluginDependencyTestMavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTestMavenITmng4590ImportedPomUsesSystemAndUserPropertiesTestThis PR adapts the tests by:
-Dmaven.model.dependencyInterpolation.full=trueto the existing test methods so they continue testing the full-interpolation behaviormatchesVersionRange("[3.10.0,)")that verify the new default (restricted) behavior: when the opt-out is not set, the build should fail becausesystemPathexpressions remain unresolvedThis matches the approach taken for the in-tree ITs on master/4.0.x in commit 3c097358a5.