From 1499b5dcd382c1f51164fc75414b6da0a9afbe36 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Thu, 13 Oct 2005 12:16:43 +0000 Subject: [PATCH] PR: MNG-122 finish cleanup of resolution exceptions git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@320748 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/artifact/resolver/DefaultArtifactResolver.java | 5 +++-- .../apache/maven/project/DefaultMavenProjectBuilder.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index e5757c3182..18cece89e2 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -162,8 +162,9 @@ public class DefaultArtifactResolver } catch ( IOException e ) { - throw new ArtifactResolutionException( "Unable to copy resolved artifact for local use", - artifact, remoteRepositories, e ); + throw new ArtifactResolutionException( + "Unable to copy resolved artifact for local use: " + e.getMessage(), artifact, + remoteRepositories, e ); } } artifact.setFile( copy ); diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index 250cf4f066..c1a7edd4d6 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -408,7 +408,8 @@ public class DefaultMavenProjectBuilder } catch ( ArtifactResolutionException e ) { - throw new ProjectBuildingException( projectId, "Error getting the POM in the repository", e ); + throw new ProjectBuildingException( projectId, "Error getting POM for '" + projectId + + "' from the repository: " + e.getMessage(), e ); } catch ( ArtifactNotFoundException e ) { @@ -419,7 +420,8 @@ public class DefaultMavenProjectBuilder } else { - throw new ProjectBuildingException( projectId, "POM not found in repository", e ); + throw new ProjectBuildingException( projectId, "POM '" + projectId + "' not found in repository: " + + e.getMessage(), e ); } } }