diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java index 31af244a1b..8a7c9fad79 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java @@ -172,6 +172,11 @@ public class DefaultWagonManager releaseWagon( wagon ); } + catch ( ResourceDoesNotExistException e ) + { + // This one we will eat when looking through remote repositories + // because we want to cycle through them all before squawking. + } catch ( UnsupportedProtocolException e ) { throw new TransferFailedException( "Unsupported Protocol: ", e ); @@ -188,10 +193,6 @@ public class DefaultWagonManager { throw new TransferFailedException( "Authorization failed: ", e ); } - catch ( ResourceDoesNotExistException e ) - { - throw new TransferFailedException( "Resource doesn't exist: ", e ); - } catch ( Exception e ) { throw new TransferFailedException( "Release of wagon failed: ", e ); @@ -212,6 +213,8 @@ public class DefaultWagonManager else { temp.delete(); + + throw new TransferFailedException( "Resource doesn't exist in any remote repository" ); } }