From 069a4a7985da2d959f5271a423e7646ec7a4767d Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Wed, 29 Sep 2010 10:43:56 +0000 Subject: [PATCH] o Improved error message in case of dependency resolution git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1002574 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/model/building/DefaultModelBuilder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index 0dc276f469..6757c425fb 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -831,7 +831,10 @@ public class DefaultModelBuilder buffer.append( " for " ).append( ModelProblemUtils.toId( childModel ) ); } buffer.append( ": " ).append( e.getMessage() ); - buffer.append( " and 'parent.relativePath' points at wrong local POM" ); + if ( childModel.getProjectDirectory() != null ) + { + buffer.append( " and 'parent.relativePath' points at wrong local POM" ); + } problems.add( Severity.FATAL, buffer.toString(), parent.getLocation( "" ), e ); throw new ModelBuildingException( problems.getRootModel(), problems.getRootModelId(),