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


##########
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:
   For parallel we will have duplicate project name 
   
   ```
   [project name test] Building: project name test
   ```
   
   maybe simple move project name to prefix ... and log always as:
   
   ```
   [project name test] staring
   [project name test] SUCCESS (1.292 s)
   ```
   
   



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