You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/12/27 23:50:48 UTC

[GitHub] [maven] michael-o edited a comment on pull request #177: [MNG-6471] during parallel build, ensure to set the thread name to the artifactId

michael-o edited a comment on pull request #177:
URL: https://github.com/apache/maven/pull/177#issuecomment-751530508


   Here is a very simple counter proposal:
   ```
   $ git diff
   diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
   index 73839fc7c..cf4481172 100644
   --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
   +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
   @@ -100,6 +100,7 @@ public void buildProject( MavenSession session, MavenSession rootSession, Reacto
                }
   
                BuilderCommon.attachToThread( currentProject );
   +            Thread.currentThread().setName( "builder-" + currentProject.getId() );
   
                projectExecutionListener.beforeProjectExecution( new ProjectExecutionEvent( session, currentProject ) );
   ```
   
   Idealy, this is solved in `BuilderCommon.attachToThread()`and a `BuilderCommon.detachfFomThread()` method.


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

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