You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2016/06/12 17:30:51 UTC
maven git commit: [MNG-3507] enhanced error hints with color
Repository: maven
Updated Branches:
refs/heads/master 050936ce1 -> 92334a1dd
[MNG-3507] enhanced error hints with color
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/92334a1d
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/92334a1d
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/92334a1d
Branch: refs/heads/master
Commit: 92334a1dd9f2f3df77b3c039be7742ea19a8ee81
Parents: 050936c
Author: Herv� Boutemy <hb...@apache.org>
Authored: Sun Jun 12 19:30:48 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Sun Jun 12 19:30:48 2016 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/maven/cli/MavenCli.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/92334a1d/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
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 15dc575..38caf83 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
@@ -19,6 +19,8 @@ package org.apache.maven.cli;
* under the License.
*/
+import static org.fusesource.jansi.Ansi.ansi;
+
import java.io.BufferedInputStream;
import java.io.Console;
import java.io.File;
@@ -1011,11 +1013,13 @@ public class MavenCli
if ( !cliRequest.showErrors )
{
- slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the -e switch." );
+ slf4jLogger.error( "To see the full stack trace of the errors, re-run Maven with the "
+ + ansi().bold().a( "-e" ).reset() + " switch." );
}
if ( !slf4jLogger.isDebugEnabled() )
{
- slf4jLogger.error( "Re-run Maven using the -X switch to enable full debug logging." );
+ slf4jLogger.error( "Re-run Maven using the " + ansi().bold().a( "-X" ).reset()
+ + " switch to enable full debug logging." );
}
if ( !references.isEmpty() )
@@ -1026,7 +1030,7 @@ public class MavenCli
for ( Map.Entry<String, String> entry : references.entrySet() )
{
- slf4jLogger.error( entry.getValue() + " " + entry.getKey() );
+ slf4jLogger.error( ansi().bold().a( entry.getValue() ).reset() + " " + entry.getKey() );
}
}
@@ -1034,7 +1038,8 @@ public class MavenCli
{
slf4jLogger.error( "" );
slf4jLogger.error( "After correcting the problems, you can resume the build with the command" );
- slf4jLogger.error( " mvn <goals> -rf :" + project.getArtifactId() );
+ slf4jLogger.error( ansi().bold().a( " mvn <goals> -rf :" )
+ .a( project.getArtifactId() ).reset().toString() );
}
if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( cliRequest.request.getReactorFailureBehavior() ) )