Package org.apache.maven.cli
Class CLIReportingUtils
- java.lang.Object
-
- org.apache.maven.cli.CLIReportingUtils
-
public final class CLIReportingUtils extends java.lang.ObjectUtility class used to report errors, statistics, application version info, etc.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUILD_VERSION_PROPERTYstatic longMBprivate static longONE_DAYprivate static longONE_HOURprivate static longONE_MINUTEprivate static longONE_SECOND
-
Constructor Summary
Constructors Constructor Description CLIReportingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.StringcreateMavenVersionString(java.util.Properties buildProperties)Create a human readable string containing the Maven version, buildnumber, and time of buildstatic java.lang.StringformatDuration(long duration)static java.lang.StringformatTimestamp(long timestamp)(package private) static java.util.PropertiesgetBuildProperties()private static java.lang.Stringreduce(java.lang.String s)static voidshowError(org.slf4j.Logger logger, java.lang.String message, java.lang.Throwable e, boolean showStackTrace)static java.lang.StringshowVersion()
-
-
-
Field Detail
-
MB
public static final long MB
- See Also:
- Constant Field Values
-
ONE_SECOND
private static final long ONE_SECOND
- See Also:
- Constant Field Values
-
ONE_MINUTE
private static final long ONE_MINUTE
- See Also:
- Constant Field Values
-
ONE_HOUR
private static final long ONE_HOUR
- See Also:
- Constant Field Values
-
ONE_DAY
private static final long ONE_DAY
- See Also:
- Constant Field Values
-
BUILD_VERSION_PROPERTY
public static final java.lang.String BUILD_VERSION_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
showVersion
public static java.lang.String showVersion()
-
createMavenVersionString
static java.lang.String createMavenVersionString(java.util.Properties buildProperties)
Create a human readable string containing the Maven version, buildnumber, and time of build- Parameters:
buildProperties- The build properties- Returns:
- Readable build info
-
reduce
private static java.lang.String reduce(java.lang.String s)
-
getBuildProperties
static java.util.Properties getBuildProperties()
-
showError
public static void showError(org.slf4j.Logger logger, java.lang.String message, java.lang.Throwable e, boolean showStackTrace)
-
formatTimestamp
public static java.lang.String formatTimestamp(long timestamp)
-
formatDuration
public static java.lang.String formatDuration(long duration)
-
-