mirror of https://github.com/apache/maven.git
[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:
parent
3996f56e85
commit
ca16d93499
|
@ -24,6 +24,7 @@ import java.text.DecimalFormat;
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.sonatype.aether.transfer.TransferCancelledException;
|
||||||
import org.sonatype.aether.transfer.TransferEvent;
|
import org.sonatype.aether.transfer.TransferEvent;
|
||||||
import org.sonatype.aether.transfer.TransferResource;
|
import org.sonatype.aether.transfer.TransferResource;
|
||||||
import org.sonatype.aether.util.listener.AbstractTransferListener;
|
import org.sonatype.aether.util.listener.AbstractTransferListener;
|
||||||
|
@ -39,6 +40,7 @@ abstract class AbstractMavenTransferListener
|
||||||
this.out = ( out != null ) ? out : System.out;
|
this.out = ( out != null ) ? out : System.out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void transferInitiated( TransferEvent event )
|
public void transferInitiated( TransferEvent event )
|
||||||
{
|
{
|
||||||
String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
|
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() );
|
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 )
|
public void transferSucceeded( TransferEvent event )
|
||||||
{
|
{
|
||||||
TransferResource resource = event.getResource();
|
TransferResource resource = event.getResource();
|
||||||
|
|
Loading…
Reference in New Issue