[MNG-4824] multiple failures need additional whitespace

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@998878 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-09-20 10:35:45 +00:00
parent 9e99fe5e65
commit 3996f56e85
2 changed files with 17 additions and 10 deletions

View File

@ -139,8 +139,8 @@ public class DefaultExceptionHandler
}
String message =
"The project " + result.getProjectId() + " (" + result.getPomFile() + ") has " + children.size() + " error"
+ ( children.size() == 1 ? "" : "s" );
"\nThe project " + result.getProjectId() + " (" + result.getPomFile() + ") has "
+ children.size() + " error" + ( children.size() == 1 ? "" : "s" );
return new ExceptionSummary( null, message, null, children );
}

View File

@ -526,7 +526,7 @@ public class MavenCli
}
}
String msg = indent + summary.getMessage();
String msg = summary.getMessage();
if ( StringUtils.isNotEmpty( referenceKey ) )
{
@ -536,17 +536,24 @@ public class MavenCli
}
else
{
msg += '\n' + indent + "-> " + referenceKey;
msg += "\n-> " + referenceKey;
}
}
if ( showErrors || ( summary.getException() instanceof InternalErrorException ) )
String[] lines = msg.split( "(\r\n)|(\r)|(\n)" );
for ( int i = 0; i < lines.length; i++ )
{
logger.error( msg, summary.getException() );
String line = indent + lines[i].trim();
if ( i == lines.length - 1 && ( showErrors || ( summary.getException() instanceof InternalErrorException ) ) )
{
logger.error( line, summary.getException() );
}
else
{
logger.error( msg );
logger.error( line );
}
}
indent += " ";