From 8eedb834774c70e6c135adf355d580536191d228 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sat, 6 Jun 2009 17:21:56 +0000 Subject: [PATCH] o Improved exception handling git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@782281 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/project/RepositoryModelResolver.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java b/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java index 029864e393..29b5108ed6 100644 --- a/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java +++ b/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java @@ -103,12 +103,10 @@ class RepositoryModelResolver remoteRepositories.add( 0, mirror ); } - catch ( org.apache.maven.artifact.InvalidRepositoryException e ) + catch ( Exception e ) { - throw new InvalidRepositoryException( "Failed to create artifact repository for " + repository.getId() - + " with layout " + repository.getLayout() + " and URL " + repository.getUrl(), repository, e ); + throw new InvalidRepositoryException( e.getMessage(), repository, e ); } - } public ModelSource resolveModel( String groupId, String artifactId, String version ) @@ -130,7 +128,7 @@ class RepositoryModelResolver catch ( ArtifactResolutionException e ) { throw new UnresolvableModelException( "Failed to resolve POM for " + groupId + ":" + artifactId + ":" - + version, e ); + + version + " due to " + e.getMessage(), e ); } return new FileModelSource( artifactParent.getFile() );