org.apache.maven.cli
Class CLIReportingUtils

java.lang.Object
  extended by org.apache.maven.cli.CLIReportingUtils

public final class CLIReportingUtils
extends java.lang.Object

Utility class used to report errors, statistics, application version info, etc.

Author:
jdcasey

Field Summary
static long MB
           
static int MS_PER_SEC
           
static int SEC_PER_MIN
           
 
Method Summary
static void buildErrorMessage(java.lang.Exception e, boolean showStackTraces, CoreErrorReporter reporter, java.io.StringWriter writer)
           
static void logResult(MavenExecutionRequest request, MavenExecutionResult result, MavenEmbedderLogger logger)
          Logs result of the executed build.
static void showError(java.lang.String message, java.lang.Exception e, boolean showStackTraces, CoreErrorReporter reporter, MavenEmbedderLogger logger)
          Format the exception and output it through the logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MB

public static final long MB
See Also:
Constant Field Values

MS_PER_SEC

public static final int MS_PER_SEC
See Also:
Constant Field Values

SEC_PER_MIN

public static final int SEC_PER_MIN
See Also:
Constant Field Values
Method Detail

logResult

public static void logResult(MavenExecutionRequest request,
                             MavenExecutionResult result,
                             MavenEmbedderLogger logger)
Logs result of the executed build.

Parameters:
request - - build parameters
result - - result of build
logger - - the logger to use

showError

public static void showError(java.lang.String message,
                             java.lang.Exception e,
                             boolean showStackTraces,
                             CoreErrorReporter reporter,
                             MavenEmbedderLogger logger)
Format the exception and output it through the logger.

Parameters:
message - - error message
e - - exception that was thrown
showStackTraces -
logger -

buildErrorMessage

public static void buildErrorMessage(java.lang.Exception e,
                                     boolean showStackTraces,
                                     CoreErrorReporter reporter,
                                     java.io.StringWriter writer)


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.