From ca16d93499d7074bf0c0e2170acee0e691e62409 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Mon, 20 Sep 2010 11:44:20 +0000 Subject: [PATCH] [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 --- .../maven/cli/AbstractMavenTransferListener.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java index 5e2b656a32..0497139252 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/AbstractMavenTransferListener.java @@ -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();