You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/06/20 20:16:22 UTC

[maven-resolver] 01/01: [MRESOLVER-91] Error messages not clear when not reattempting resolution when a previous attempt failed and the failure was cached

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MRESOLVER-91
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git

commit 334c5a251bd275acbe53c037b7a79b031331a594
Author: Giorgos Gaganis <ga...@yahoo.com>
AuthorDate: Fri Jul 19 15:32:43 2019 +0300

    [MRESOLVER-91] Error messages not clear when not reattempting resolution when a previous attempt failed and the failure was cached
    
    For users that were not aware or did not understand well the
    ResolutionErrorPolicy, the error messages that were presented when this
    policy was enforced, ie a resolution was not reattempted due to a
    previous failure that was cached, could be difficult to understand.
    
    This closes #37
---
 .../internal/impl/DefaultUpdateCheckManager.java   | 28 ++++++++++++----------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java
index b787ebd..2da7565 100644
--- a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java
+++ b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java
@@ -215,16 +215,18 @@ public class DefaultUpdateCheckManager
     {
         if ( error == null || error.length() <= 0 )
         {
-            return new ArtifactNotFoundException( artifact, repository, "Failure to find " + artifact + " in "
-                + repository.getUrl() + " was cached in the local repository, "
-                + "resolution will not be reattempted until the update interval of " + repository.getId()
+            return new ArtifactNotFoundException( artifact, repository, artifact
+                + " was not found in " + repository.getUrl() + " during a previous attempt. This failure was"
+                + " cached in the local repository and"
+                + " resolution is not reattempted until the update interval of " + repository.getId()
                 + " has elapsed or updates are forced", true );
         }
         else
         {
-            return new ArtifactTransferException( artifact, repository, "Failure to transfer " + artifact + " from "
-                + repository.getUrl() + " was cached in the local repository, "
-                + "resolution will not be reattempted until the update interval of " + repository.getId()
+            return new ArtifactTransferException( artifact, repository, artifact + " failed to transfer from "
+                + repository.getUrl() + " during a previous attempt. This failure"
+                + " was cached in the local repository and"
+                + " resolution is not reattempted until the update interval of " + repository.getId()
                 + " has elapsed or updates are forced. Original error: " + error, true );
         }
     }
@@ -326,16 +328,18 @@ public class DefaultUpdateCheckManager
     {
         if ( error == null || error.length() <= 0 )
         {
-            return new MetadataNotFoundException( metadata, repository, "Failure to find " + metadata + " in "
-                + repository.getUrl() + " was cached in the local repository, "
-                + "resolution will not be reattempted until the update interval of " + repository.getId()
+            return new MetadataNotFoundException( metadata, repository, metadata + " was not found in "
+                + repository.getUrl() + " during a previous attempt."
+                + " This failure was cached in the local repository and"
+                + " resolution is not be reattempted until the update interval of " + repository.getId()
                 + " has elapsed or updates are forced", true );
         }
         else
         {
-            return new MetadataTransferException( metadata, repository, "Failure to transfer " + metadata + " from "
-                + repository.getUrl() + " was cached in the local repository, "
-                + "resolution will not be reattempted until the update interval of " + repository.getId()
+            return new MetadataTransferException( metadata, repository, metadata + "failed to transfer from "
+                + repository.getUrl() + " during a previous attempt."
+                + " This failure was cached in the local repository and"
+                + " resolution will not be reattempted until the update interval of " + repository.getId()
                 + " has elapsed or updates are forced. Original error: " + error, true );
         }
     }