You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2014/04/30 21:46:12 UTC
[1/2] git commit: Remove unused imports.
Repository: maven
Updated Branches:
refs/heads/master 6d05ac1ad -> 45ab718bc
Remove unused imports.
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/a39d1d33
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/a39d1d33
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/a39d1d33
Branch: refs/heads/master
Commit: a39d1d33f270634abc88d97ebe1dda187b4ae1d3
Parents: 6d05ac1
Author: Michael Osipov <mi...@apache.org>
Authored: Sun Apr 27 11:27:11 2014 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Apr 27 11:27:11 2014 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/maven/cli/CLIReportingUtils.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/a39d1d33/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 37773c1..cc649b5 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -21,8 +21,6 @@ package org.apache.maven.cli;
import java.io.IOException;
import java.io.InputStream;
-import java.text.SimpleDateFormat;
-import java.util.Date;
import java.util.Locale;
import java.util.Properties;
import java.util.TimeZone;
[2/2] git commit: [MNG-5623] Exception when printing Reactor Summary
Posted by mi...@apache.org.
[MNG-5623] Exception when printing Reactor Summary
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/45ab718b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/45ab718b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/45ab718b
Branch: refs/heads/master
Commit: 45ab718bc0fa1bda6e41dd19a10360fa6953ed19
Parents: a39d1d3
Author: Michael Osipov <mi...@apache.org>
Authored: Wed Apr 30 21:38:22 2014 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Wed Apr 30 21:38:22 2014 +0200
----------------------------------------------------------------------
.../maven/cli/event/ExecutionEventLogger.java | 26 ++++++++++++++------
1 file changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/45ab718b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 1412cac..023cfce 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -44,7 +44,8 @@ public class ExecutionEventLogger
private final Logger logger;
private static final int LINE_LENGTH = 72;
- private static final int BUILD_TIME_DURATION_LENGTH = 9;
+ private static final int MAX_PADDED_BUILD_TIME_DURATION_LENGTH = 9;
+ private static final int MAX_PROJECT_NAME_LENGTH = 52;
public ExecutionEventLogger()
{
@@ -134,13 +135,16 @@ public class ExecutionEventLogger
StringBuilder buffer = new StringBuilder( 128 );
buffer.append( project.getName() );
-
buffer.append( ' ' );
- while ( buffer.length() < LINE_LENGTH - 21 )
+
+ if ( buffer.length() <= MAX_PROJECT_NAME_LENGTH )
{
- buffer.append( '.' );
+ while ( buffer.length() < MAX_PROJECT_NAME_LENGTH )
+ {
+ buffer.append( '.' );
+ }
+ buffer.append( ' ' );
}
- buffer.append( ' ' );
BuildSummary buildSummary = result.getBuildSummary( project );
@@ -152,7 +156,11 @@ public class ExecutionEventLogger
{
buffer.append( "SUCCESS [" );
String buildTimeDuration = formatDuration( buildSummary.getTime() );
- buffer.append( chars( ' ', BUILD_TIME_DURATION_LENGTH - buildTimeDuration.length() ) );
+ int padSize = MAX_PADDED_BUILD_TIME_DURATION_LENGTH - buildTimeDuration.length();
+ if ( padSize > 0 )
+ {
+ buffer.append( chars( ' ', padSize ) );
+ }
buffer.append( buildTimeDuration );
buffer.append( "]" );
}
@@ -160,7 +168,11 @@ public class ExecutionEventLogger
{
buffer.append( "FAILURE [" );
String buildTimeDuration = formatDuration( buildSummary.getTime() );
- buffer.append( chars( ' ', BUILD_TIME_DURATION_LENGTH - buildTimeDuration.length() ) );
+ int padSize = MAX_PADDED_BUILD_TIME_DURATION_LENGTH - buildTimeDuration.length();
+ if ( padSize > 0 )
+ {
+ buffer.append( chars( ' ', padSize ) );
+ }
buffer.append( buildTimeDuration );
buffer.append( "]" );
}