[MNG-4426] No javac errors in console when error stacktraces are turned on

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@832729 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-11-04 12:51:58 +00:00
parent 8ebe8cacd8
commit 61ba8778b6
3 changed files with 19 additions and 6 deletions

View File

@ -212,9 +212,9 @@ public class DefaultExceptionHandler
{
exceptionMessage = longMessage;
}
else
else if ( !exceptionMessage.contains( longMessage ) )
{
exceptionMessage = join( exceptionMessage, longMessage );
exceptionMessage = join( exceptionMessage, '\n' + longMessage );
}
}
}

View File

@ -235,7 +235,6 @@ public class MavenProject
this.repositorySystem = repositorySystem;
}
//TODO: need to integrate the effective scope and refactor it out of the MMS
@Deprecated
public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, String inheritedScope, ArtifactFilter filter )
throws InvalidDependencyVersionException

View File

@ -481,18 +481,32 @@ public class MavenCli
referenceKey = references.get( summary.getReference() );
if ( referenceKey == null )
{
referenceKey = "[" + references.size() + "]";
referenceKey = "[Help " + ( references.size() + 1 ) + "]";
references.put( summary.getReference(), referenceKey );
}
}
String msg = indent + summary.getMessage();
if ( StringUtils.isNotEmpty( referenceKey ) )
{
if ( msg.indexOf( '\n' ) < 0 )
{
msg += " -> " + referenceKey;
}
else
{
msg += '\n' + indent + "-> " + referenceKey;
}
}
if ( showErrors )
{
logger.error( indent + referenceKey, summary.getException() );
logger.error( msg, summary.getException() );
}
else
{
logger.error( indent + summary.getMessage() + " " + referenceKey );
logger.error( msg );
}
indent += " ";