[MNG-4829] [regression] Checksum failures aren't logged

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@998895 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-09-20 11:44:20 +00:00
parent 3996f56e85
commit ca16d93499
1 changed files with 13 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;
import org.sonatype.aether.transfer.TransferCancelledException;
import org.sonatype.aether.transfer.TransferEvent;
import org.sonatype.aether.transfer.TransferResource;
import org.sonatype.aether.util.listener.AbstractTransferListener;
@ -39,6 +40,7 @@ abstract class AbstractMavenTransferListener
this.out = ( out != null ) ? out : System.out;
}
@Override
public void transferInitiated( TransferEvent event )
{
String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
@ -46,6 +48,17 @@ abstract class AbstractMavenTransferListener
out.println( message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
}
@Override
public void transferCorrupted( TransferEvent event )
throws TransferCancelledException
{
TransferResource resource = event.getResource();
out.println( "[WARNING] " + event.getException().getMessage() + " for " + resource.getRepositoryUrl()
+ resource.getResourceName() );
}
@Override
public void transferSucceeded( TransferEvent event )
{
TransferResource resource = event.getResource();