mirror of https://github.com/apache/maven.git
[MNG-6471] Parallel builder should use the module name as thread name
This closes #177
This commit is contained in:
parent
5060349e67
commit
f32c3dba94
|
@ -185,6 +185,12 @@ public class MultiThreadedBuilder
|
||||||
return new Callable<ProjectSegment>()
|
return new Callable<ProjectSegment>()
|
||||||
{
|
{
|
||||||
public ProjectSegment call()
|
public ProjectSegment call()
|
||||||
|
{
|
||||||
|
final Thread currentThread = Thread.currentThread();
|
||||||
|
final String originalThreadName = currentThread.getName();
|
||||||
|
currentThread.setName( "mvn-builder-" + projectBuild.getProject().getId() );
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// muxer.associateThreadWithProjectSegment( projectBuild );
|
// muxer.associateThreadWithProjectSegment( projectBuild );
|
||||||
lifecycleModuleBuilder.buildProject( projectBuild.getSession(), rootSession, reactorContext,
|
lifecycleModuleBuilder.buildProject( projectBuild.getSession(), rootSession, reactorContext,
|
||||||
|
@ -193,6 +199,11 @@ public class MultiThreadedBuilder
|
||||||
|
|
||||||
return projectBuild;
|
return projectBuild;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
currentThread.setName( originalThreadName );
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue