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
|
@ -56,12 +56,20 @@ public class BuildListCalculator
|
|||
projects = session.getProjects();
|
||||
}
|
||||
for ( MavenProject project : projects )
|
||||
{
|
||||
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