private void logStats( MavenSession session ) { infoLine( '-' ); long finish = System.currentTimeMillis(); long time = finish - session.getRequest().getStartTime().getTime(); String wallClock = session.getRequest().getDegreeOfConcurrency() > 1 ? " (Wall Clock)" : ""; logger.info( "Total time: " + formatDuration( time ) + wallClock ); logger.info( "Finished at: " + formatTimestamp( finish ) ); }
/** * Create a human readable string containing the Maven version, buildnumber, and time of build * * @param buildProperties The build properties * @return Readable build info */ static String createMavenVersionString( Properties buildProperties ) { String timestamp = reduce( buildProperties.getProperty( "timestamp" ) ); String version = reduce( buildProperties.getProperty( BUILD_VERSION_PROPERTY ) ); String rev = reduce( buildProperties.getProperty( "buildNumber" ) ); String distributionName = reduce( buildProperties.getProperty( "distributionName" ) ); String msg = distributionName + " "; msg += ( version != null ? version : "<version unknown>" ); if ( rev != null || timestamp != null ) { msg += " ("; msg += ( rev != null ? rev : "" ); if ( StringUtils.isNotBlank( timestamp ) ) { String ts = formatTimestamp( Long.valueOf( timestamp ) ); msg += ( rev != null ? "; " : "" ) + ts; } msg += ")"; } return msg; }
private void logStats( MavenSession session ) { infoLine( '-' ); long finish = System.currentTimeMillis(); long time = finish - session.getRequest().getStartTime().getTime(); String wallClock = session.getRequest().getDegreeOfConcurrency() > 1 ? " (Wall Clock)" : ""; logger.info( "Total time: " + formatDuration( time ) + wallClock ); logger.info( "Finished at: " + formatTimestamp( finish ) ); }
/** * Create a human readable string containing the Maven version, buildnumber, and time of build * * @param buildProperties The build properties * @return Readable build info */ static String createMavenVersionString( Properties buildProperties ) { String timestamp = reduce( buildProperties.getProperty( "timestamp" ) ); String version = reduce( buildProperties.getProperty( BUILD_VERSION_PROPERTY ) ); String rev = reduce( buildProperties.getProperty( "buildNumber" ) ); String distributionName = reduce( buildProperties.getProperty( "distributionName" ) ); String msg = distributionName + " "; msg += ( version != null ? version : "<version unknown>" ); if ( rev != null || timestamp != null ) { msg += " ("; msg += ( rev != null ? rev : "" ); if ( StringUtils.isNotBlank( timestamp ) ) { String ts = formatTimestamp( Long.valueOf( timestamp ) ); msg += ( rev != null ? "; " : "" ) + ts; } msg += ")"; } return msg; }