maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r932366 - /maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Date Fri, 09 Apr 2010 11:48:37 GMT
Author: bentmann
Date: Fri Apr  9 11:48:37 2010
New Revision: 932366

URL: http://svn.apache.org/viewvc?rev=932366&view=rev
Log:
o Added short-circuit to disable local parent resolution via <relativePath/>

Modified:
    maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java

Modified: maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java?rev=932366&r1=932365&r2=932366&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
(original)
+++ maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Fri Apr  9 11:48:37 2010
@@ -647,6 +647,11 @@ public class DefaultModelBuilder
 
         String parentPath = childModel.getParent().getRelativePath();
 
+        if ( parentPath == null || parentPath.length() <= 0 )
+        {
+            return null;
+        }
+
         parentPath = parentPath.replace( '\\', File.separatorChar ).replace( '/', File.separatorChar
);
 
         File pomFile = new File( new File( projectDirectory, parentPath ).toURI().normalize()
);



Mime
View raw message