slawekjaranowski opened a new pull request, #13884:
URL: https://github.com/apache/maven/pull/13884

   Related to #13883
   
   Maven 3.10.0 resolves an unprefixed `${rootDirectory}` to the project root 
directory,
   shadowing a custom `rootDirectory` property defined in the POM
   (e.g. `<rootDirectory>${project.basedir}</rootDirectory>`).
   
   Maven 4 is **not affected**: only `${project.rootDirectory}` is supported, 
and model
   properties take precedence over the built-in values. Verified manually with 
4.0.0-rc-7
   (model interpolation and file-based profile activation). This PR adds 
regression tests
   so it stays that way, and fixes the related documentation. The actual fix 
for 3.10.x
   will follow in a separate PR against `maven-3.10.x`.
   
   ### Tests
   
   - `DefaultModelInterpolatorTest` (impl):
     - `testCustomRootDirectoryPropertyIsNotShadowed`: a custom 
`${rootDirectory}` property
       resolves to the module basedir, `${project.rootDirectory}` still 
resolves to the root directory
     - `testUnprefixedRootDirectoryIsNotInterpolated`: `${rootDirectory}` is 
not an alias of
       `${project.rootDirectory}`
   - `FileProfileActivatorTest` (impl and compat), with a module directory 
different from the root directory:
     - `testCustomRootDirectoryPropertyIsNotShadowed`
     - `testUnprefixedRootDirectoryIsNotInterpolated`
   
   All new tests fail when an unprefixed `rootDirectory` alias is introduced 
(the 3.10.0 behavior).
   
   ### Documentation
   
   `compat/maven-model-builder/src/site/markdown/index.md`:
   - file-based profile activation supports `${project.rootDirectory}`, not 
`${rootDirectory}`
   - `project.rootDirectory` is available since Maven 3.10.0 (directory 
containing `.mvn`)
     and Maven 4 (also with the `root="true"` xml attribute)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to