slachiewicz commented on code in PR #765:
URL: 
https://github.com/apache/maven-invoker-plugin/pull/765#discussion_r4055087029


##########
src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java:
##########
@@ -1526,7 +1529,15 @@ private void runBuild(
         File interpolatedPomFile = interpolatePomFile(pomFile, basedir);
         // FIXME: Think about the following code part -- ^^^^^^^ END
 
-        getLog().info(buffer().a("Building: 
").strong(buildJob.getProject()).build());
+        // when several jobs run in parallel, their console output 
interleaves; prefix every line emitted on
+        // behalf of this job with its project path so it stays attributable 
(MINVOKER-684). Lines that already
+        // carry the project name via pad(buildJob) are left alone to avoid a 
duplicate copy.
+        String logPrefix = parallelRun ? "[" + buildJob.getProject() + "] " : 
"";
+
+        getLog().info(buffer().a(logPrefix)
+                .a("Building: ")
+                .strong(buildJob.getProject())
+                .build());

Review Comment:
   Done in 96059e6 — the prefix replaces both the `Building:` line and the 
padded result line, single-threaded too, so the name appears once per line. 
Word choice (`starting`) is yours; easy to change if you prefer `Building`.



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