MNG-3637: making sure it says we fail when we fail

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@701228 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-10-02 19:52:53 +00:00
parent cc5827fa72
commit d06897e91c
2 changed files with 6 additions and 11 deletions

View File

@ -85,8 +85,7 @@ public class DefaultMaven
// artifact resolution // artifact resolution
// lifecycle execution // lifecycle execution
public ReactorManager createReactorManager( MavenExecutionRequest request, public ReactorManager createReactorManager( MavenExecutionRequest request, MavenExecutionResult result )
MavenExecutionResult result )
{ {
List projects; List projects;
try try
@ -115,16 +114,13 @@ public class DefaultMaven
try try
{ {
reactorManager = new ReactorManager( reactorManager = new ReactorManager( projects, request.getReactorFailureBehavior() );
projects,
request.getReactorFailureBehavior() );
result.setReactorManager( reactorManager ); result.setReactorManager( reactorManager );
} }
catch ( CycleDetectedException e ) catch ( CycleDetectedException e )
{ {
String message = "The projects in the reactor contain a cyclic reference: " String message = "The projects in the reactor contain a cyclic reference: " + e.getMessage();
+ e.getMessage();
ProjectCycleException error = new ProjectCycleException( projects, message, e ); ProjectCycleException error = new ProjectCycleException( projects, message, e );
@ -148,9 +144,7 @@ public class DefaultMaven
MavenExecutionResult result = new DefaultMavenExecutionResult(); MavenExecutionResult result = new DefaultMavenExecutionResult();
ReactorManager reactorManager = createReactorManager( ReactorManager reactorManager = createReactorManager( request, result );
request,
result );
if ( result.hasExceptions() ) if ( result.hasExceptions() )
{ {

View File

@ -122,7 +122,7 @@ public final class CLIReportingUtils
line( logger ); line( logger );
} }
if ( ( reactorManager != null ) && !ReactorManager.FAIL_NEVER.equals( reactorManager.getFailureBehavior() ) ) if ( !ReactorManager.FAIL_NEVER.equals( request.getReactorFailureBehavior() ) )
{ {
logger.info( "BUILD FAILED" ); logger.info( "BUILD FAILED" );
@ -131,6 +131,7 @@ public final class CLIReportingUtils
stats( request.getStartTime(), logger ); stats( request.getStartTime(), logger );
line( logger ); line( logger );
printSuccess = false; printSuccess = false;
} }
else else