mirror of https://github.com/apache/maven.git
[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:
parent
e733004eb1
commit
a9fcd5d108
|
@ -29,6 +29,7 @@ import java.util.List;
|
||||||
import java.util.concurrent.CompletionService;
|
import java.util.concurrent.CompletionService;
|
||||||
import java.util.concurrent.ExecutorCompletionService;
|
import java.util.concurrent.ExecutorCompletionService;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the build life cycle
|
* Starts the build life cycle
|
||||||
|
@ -144,6 +145,9 @@ public class LifecycleStarter
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
executor.shutdown();
|
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
|
else
|
||||||
|
|
|
@ -66,12 +66,7 @@ public class LifecycleThreadedBuilder
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
multiThreadedProjectTaskSegmentBuild( analyzer, reactorContext, session, service, taskSegment, projectBuildMap, muxer );
|
multiThreadedProjectTaskSegmentBuild( analyzer, reactorContext, session, service, taskSegment, projectBuildMap, muxer );
|
||||||
if ( reactorContext.getReactorBuildStatus().isHalted() )
|
if ( reactorContext.getReactorBuildStatus().isHalted( ) )
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( reactorContext.getReactorBuildStatus().isHalted() )
|
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue