[MNG-4682] Exception upon build failure in parallel builds

Also removed duplicated code line

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@956100 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kristian Rosenvold 2010-06-18 19:09:42 +00:00
parent e733004eb1
commit a9fcd5d108
2 changed files with 5 additions and 6 deletions

View File

@ -29,6 +29,7 @@ import java.util.List;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
/**
* Starts the build life cycle
@ -144,6 +145,9 @@ public class LifecycleStarter
finally
{
executor.shutdown();
// If the builder has terminated with an exception we want to catch any stray threads before going
// to System.exit in the mavencli.
executor.awaitTermination( 5, TimeUnit.SECONDS ) ;
}
}
else

View File

@ -66,12 +66,7 @@ public class LifecycleThreadedBuilder
try
{
multiThreadedProjectTaskSegmentBuild( analyzer, reactorContext, session, service, taskSegment, projectBuildMap, muxer );
if ( reactorContext.getReactorBuildStatus().isHalted() )
{
break;
}
if ( reactorContext.getReactorBuildStatus().isHalted() )
if ( reactorContext.getReactorBuildStatus().isHalted( ) )
{
break;
}