From d06897e91cd10906d4e7969c3a0789586dc62cd2 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 2 Oct 2008 19:52:53 +0000 Subject: [PATCH] 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 --- .../main/java/org/apache/maven/DefaultMaven.java | 14 ++++---------- .../org/apache/maven/cli/CLIReportingUtils.java | 3 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index eb419d6846..dc76375ae7 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -85,8 +85,7 @@ public class DefaultMaven // artifact resolution // lifecycle execution - public ReactorManager createReactorManager( MavenExecutionRequest request, - MavenExecutionResult result ) + public ReactorManager createReactorManager( MavenExecutionRequest request, MavenExecutionResult result ) { List projects; try @@ -115,16 +114,13 @@ public class DefaultMaven try { - reactorManager = new ReactorManager( - projects, - request.getReactorFailureBehavior() ); + reactorManager = new ReactorManager( projects, request.getReactorFailureBehavior() ); result.setReactorManager( reactorManager ); } catch ( CycleDetectedException e ) { - String message = "The projects in the reactor contain a cyclic reference: " - + e.getMessage(); + String message = "The projects in the reactor contain a cyclic reference: " + e.getMessage(); ProjectCycleException error = new ProjectCycleException( projects, message, e ); @@ -148,9 +144,7 @@ public class DefaultMaven MavenExecutionResult result = new DefaultMavenExecutionResult(); - ReactorManager reactorManager = createReactorManager( - request, - result ); + ReactorManager reactorManager = createReactorManager( request, result ); if ( result.hasExceptions() ) { diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java index 0b208b76a5..6711dd4129 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java @@ -122,7 +122,7 @@ public final class CLIReportingUtils line( logger ); } - if ( ( reactorManager != null ) && !ReactorManager.FAIL_NEVER.equals( reactorManager.getFailureBehavior() ) ) + if ( !ReactorManager.FAIL_NEVER.equals( request.getReactorFailureBehavior() ) ) { logger.info( "BUILD FAILED" ); @@ -131,6 +131,7 @@ public final class CLIReportingUtils stats( request.getStartTime(), logger ); line( logger ); + printSuccess = false; } else