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 2022/01/16 21:25:07 UTC
[GitHub] [maven] famod commented on a change in pull request #662: [MNG-7381] Shorten thread name to artifactId, conditionally with groupId
famod commented on a change in pull request #662:
URL: https://github.com/apache/maven/pull/662#discussion_r785496490
##########
File path: maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/MultiThreadedBuilder.java
##########
@@ -129,14 +132,23 @@ private void multiThreadedProjectTaskSegmentBuild( ConcurrencyDependencyGraph an
Map<MavenProject, ProjectSegment> projectBuildList,
ThreadOutputMuxer muxer )
{
+ // gather artifactIds which are not unique so that the respective thread names can be extended with the groupId
+ Set<String> duplicateArtifactIds = projectBuildList.keySet().stream()
+ .map( MavenProject::getArtifactId )
+ .collect( Collectors.groupingBy( Function.identity(), Collectors.counting() ) )
Review comment:
We could also stop here, usage in `createBuildCallable()` would then be something like:
```java
final String threadNameSuffix = artifactIdFrequency.get( project.getArtifactId() ) > 1
//...
```
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org