michael-o commented on a change in pull request #662:
URL: https://github.com/apache/maven/pull/662#discussion_r785507270



##########
File path: 
maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
##########
@@ -183,19 +196,26 @@ private void multiThreadedProjectTaskSegmentBuild( 
ConcurrencyDependencyGraph an
     private Callable<ProjectSegment> createBuildCallable( final MavenSession 
rootSession,
                                                           final ProjectSegment 
projectBuild,
                                                           final ReactorContext 
reactorContext,
-                                                          final TaskSegment 
taskSegment, final ThreadOutputMuxer muxer )
+                                                          final TaskSegment 
taskSegment,
+                                                          final 
ThreadOutputMuxer muxer,
+                                                          final Set<String> 
duplicateArtifactIds )
     {
         return () ->
         {
             final Thread currentThread = Thread.currentThread();
             final String originalThreadName = currentThread.getName();
-            currentThread.setName( "mvn-builder-" + 
projectBuild.getProject().getId() );
+            final MavenProject project = projectBuild.getProject();
+
+            final String threadNameSuffix = duplicateArtifactIds.contains( 
project.getArtifactId() )
+                    ? project.getGroupId() + ":" + project.getArtifactId()
+                    : project.getArtifactId();
+            currentThread.setName( "mvn-builder_" + threadNameSuffix );

Review comment:
       Please revert, we can discuss this when this is really going to be a 
problem.




-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to