scordio opened a new issue, #13883:
URL: https://github.com/apache/maven/issues/13883
### Affected version
3.10.0
### Bug description
Maven 3.10.0 changes the meaning of an existing custom `${rootDirectory}`
property when interpolating plugin configuration. The same build works with
Maven 3.9.16.
A parent POM defines:
```xml
<properties>
<rootDirectory>${project.basedir}</rootDirectory>
</properties>
```
and uses it in an inherited plugin configuration:
```xml
<javadocDirectory>${rootDirectory}/javadoc-theme</javadocDirectory>
```
In a multi-module build, Maven 3.9.16 resolves the directory relative to the
current module. Maven 3.10.0 instead resolves it relative to the project root,
even though the custom property remains defined as the module’s basedir. This
breaks builds whose resources are module-local; for example,
assertj/assertj-generator#339 fails because it looks for
`javadoc-theme/assertj-theme.css` in the repository root instead of the module.
The [interpolator
implementation](https://github.com/apache/maven/blob/maven-3.10.0/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java#L160-L175)
appears to accept unprefixed `${rootDirectory}` as an alias for the new
`${project.rootDirectory}` and gives it precedence over POM properties.
Ideally, an explicitly defined custom `${rootDirectory}` property should
continue to resolve as it did in Maven 3.9.16, while `${project.rootDirectory}`
remains available for the new root-directory behavior.
Note that we will remove the custom `rootDirectory` property in the next
AssertJ version (#4471) and use the updated parent in the modules that depend
on it, so we can move to Maven 3.10 there as well. However, I still wanted to
raise this issue to make you aware of the regression.
--
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]