GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Fix #13883: Do not shadow a custom rootDirectory property by slawekjaranowski · Pull Request #13885 · apache/maven Conversation
Member
Fixes #13883 Maven 3.10.0 accepted an unprefixed <properties> <rootDirectory>${project.basedir}</rootDirectory> </properties> In a multi-module build, Change
Maven 4 is not affected; regression tests for it were added in #13884. Tests
Documentation
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsMaven 3.10.0 accepted an unprefixed ${rootDirectory} as an alias for
${project.rootDirectory}. As this value source is evaluated before the model
properties, it shadowed a custom rootDirectory property defined in the POM,
e.g. <rootDirectory>${project.basedir}</rootDirectory>, which then resolved
to the project root directory instead of the module basedir.
Only accept the prefixed ${project.rootDirectory} (and ${pom.rootDirectory}),
as for ${project.baseUri}. The unprefixed form was never documented, and
profile activation already supports the prefixed form only.
Add tests for model interpolation and file-based profile activation, and
document ${project.rootDirectory} for profile activation.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
cstamas
approved these changes
gnodet-bot
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM. Minimal, correct fix — Pre-fix validation: This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
6 of 8 tasks
cstamas
pushed a commit
that referenced
this pull request
Follow-up to #13885, related to #13883. Targets `maven-3.10.x`. The original shadowing fix is already merged. A custom `rootDirectory` that refers to `${project.rootDirectory}` or `${pom.rootDirectory}` can still fail interpolation because the recursion detector treats the custom property and the built-in expression as the same key. Track bare `rootDirectory` separately and retain prefix-aware cycle detection for the other expressions. Tests cover model, user and system aliases, early model consumers, genuine cycles and tracker reset in both interpolators. ### Validation - New regressions fail on unchanged current `maven-3.10.x`. - `mvn -B -ntp verify`: 1,154 tests reported, 8 skipped, zero failures or errors. - Four focused Core IT cases pass with the fix; the explicit-root alias case fails on the current upstream distribution. [Companion integration tests](https://github.com/goutamadwant/maven/tree/29cb5e6764418ce6f46734e5cbb7ac57e6191b72/its/core-it-suite/src/test/resources/gh-13883-custom-root-directory). - Full Core IT suite and hosted CI have not been run. Following this checklist to help us incorporate your contribution quickly and easily: - [x] Your pull request should address just one issue, without pulling in other changes. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge. - [x] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice. - [x] Run `mvn verify` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] You have run the [Core IT][core-its] successfully. If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [ ] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers+1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesLabels
bug
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. Maven 3.10.0 shadows customrootDirectory property
Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |