You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/06/20 08:40:15 UTC
[maven] 08/30: Fix bug where the build resume hint log could be
logged incorrectly.
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 782c02e2e0a6bc0c5f943f872aa045690288dc09
Author: Martin Kanters <Ma...@infosupport.com>
AuthorDate: Fri May 22 16:16:11 2020 +0200
Fix bug where the build resume hint log could be logged incorrectly.
---
.../src/main/java/org/apache/maven/cli/MavenCli.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 4877ddd..113af25 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -1032,18 +1032,15 @@ public class MavenCli
boolean resumeFileCreated = buildResumptionManager.persistResumptionData( result );
- slf4jLogger.error( "" );
- slf4jLogger.error( "After correcting the problems, you can resume the build with the command" );
-
List<MavenProject> sortedProjects = result.getTopologicallySortedProjects();
if ( resumeFileCreated )
{
- slf4jLogger.error( buffer().a( " " ).strong( "mvn <args> -r " ).toString() );
+ logBuildResumeHint( "mvn <args> -r " );
}
else if ( project != null && !project.equals( sortedProjects.get( 0 ) ) )
{
String resumeFromSelector = buildResumptionManager.getResumeFromSelector( sortedProjects, project );
- slf4jLogger.error( buffer().a( " " ).strong( "mvn <args> -rf " + resumeFromSelector ).toString() );
+ logBuildResumeHint( "mvn <args> -rf " + resumeFromSelector );
}
if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( cliRequest.request.getReactorFailureBehavior() ) )
@@ -1063,6 +1060,13 @@ public class MavenCli
}
}
+ private void logBuildResumeHint( String resumeBuildHint )
+ {
+ slf4jLogger.error( "" );
+ slf4jLogger.error( "After correcting the problems, you can resume the build with the command" );
+ slf4jLogger.error( buffer().a( " " ).strong( resumeBuildHint ).toString() );
+ }
+
private void logSummary( ExceptionSummary summary, Map<String, String> references, String indent,
boolean showErrors )
{