gnodet commented on code in PR #1128:
URL: https://github.com/apache/maven/pull/1128#discussion_r1206305183
##########
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java:
##########
@@ -247,7 +247,11 @@ private String pluginOccurrence(MavenSession mavenSession)
{
File currentPom = prj.getFile();
if (currentPom != null) {
File rootBasedir = mavenSession.getTopLevelProject().getBasedir();
- result += " (" +
rootBasedir.toPath().relativize(currentPom.toPath()) + ")";
+ if (currentPom.getPath().startsWith(rootBasedir.getPath())) {
Review Comment:
I wonder if the path should be absoluted / normalized. Also, this should be
done against the new `Session#getRootDirectory()` imho:
```
Path root = mavenSession.getRootDirectory();
Path current = currentPom.toPath().toAbsolutePath().normalize();
if (current.startsWith(root)) {
current = root.relativize(current);
}
result += " (" + current + ")";
```
--
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]