mirror of https://github.com/apache/maven.git
o Fixed TCCL handling
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@798226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
299a4c0843
commit
e3f7710578
|
@ -309,23 +309,32 @@ public class DefaultProjectBuilder
|
|||
reactorModelPool.put( model.getGroupId(), model.getArtifactId(), model.getVersion(), model.getPomFile() );
|
||||
}
|
||||
|
||||
for ( InterimResult interimResult : interimResults )
|
||||
ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
for ( InterimResult interimResult : interimResults )
|
||||
{
|
||||
ModelBuildingResult result = modelBuilder.build( interimResult.request, interimResult.result );
|
||||
try
|
||||
{
|
||||
ModelBuildingResult result = modelBuilder.build( interimResult.request, interimResult.result );
|
||||
|
||||
MavenProject project = toProject( result, config, interimResult.listener );
|
||||
MavenProject project = toProject( result, config, interimResult.listener );
|
||||
|
||||
results.add( new DefaultProjectBuildingResult( project, result.getProblems() ) );
|
||||
}
|
||||
catch ( ModelBuildingException e )
|
||||
{
|
||||
results.add( new DefaultProjectBuildingResult( interimResult.pomFile, e.getProblems() ) );
|
||||
|
||||
errors = true;
|
||||
results.add( new DefaultProjectBuildingResult( project, result.getProblems() ) );
|
||||
}
|
||||
catch ( ModelBuildingException e )
|
||||
{
|
||||
results.add( new DefaultProjectBuildingResult( interimResult.pomFile, e.getProblems() ) );
|
||||
|
||||
errors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Thread.currentThread().setContextClassLoader( oldContextClassLoader );
|
||||
}
|
||||
|
||||
if ( errors )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue