gnodet commented on code in PR #1128:
URL: https://github.com/apache/maven/pull/1128#discussion_r1206314142


##########
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:
   Note that `rootDirectory` always refer to the root of the project, while 
`topDirectory` refer to the current path (those may be different when building 
a subset of a project when using `cd xxx && mvn ...` or `mvn -f xxx ...`
   



-- 
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