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(),