mirror of https://github.com/apache/maven.git
[MNG-7402] BuildListCalculator never detaches the classloader
This closes #683
This commit is contained in:
parent
395411fe31
commit
d29af9018b
|
@ -57,10 +57,18 @@ public class BuildListCalculator
|
|||
}
|
||||
for ( MavenProject project : projects )
|
||||
{
|
||||
BuilderCommon.attachToThread( project ); // Not totally sure if this is needed for anything
|
||||
MavenSession copiedSession = session.clone();
|
||||
copiedSession.setCurrentProject( project );
|
||||
projectBuilds.add( new ProjectSegment( project, taskSegment, copiedSession ) );
|
||||
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
|
||||
try
|
||||
{
|
||||
BuilderCommon.attachToThread( project ); // Not totally sure if this is needed for anything
|
||||
MavenSession copiedSession = session.clone();
|
||||
copiedSession.setCurrentProject( project );
|
||||
projectBuilds.add( new ProjectSegment( project, taskSegment, copiedSession ) );
|
||||
}
|
||||
finally
|
||||
{
|
||||
Thread.currentThread().setContextClassLoader( tccl );
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ProjectBuildList( projectBuilds );
|
||||
|
|
Loading…
Reference in New Issue