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 ); } } }