mirror of https://github.com/apache/maven.git
MNG-2746 fixing an obvious NPE when parent path is a directory and pom is not found. Also reported in MNGECLIPSE-184 and CONTINUUM-1000
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@494085 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb6b84a02a
commit
bf7d7a01a0
|
@ -1092,21 +1092,23 @@ public class DefaultMavenProjectBuilder
|
||||||
{
|
{
|
||||||
getLogger().debug( "Parent-POM: " + parentModel.getId() + " for project: " + project.getId() + " cannot be loaded from relative path: " + parentDescriptor + "; path does not exist." );
|
getLogger().debug( "Parent-POM: " + parentModel.getId() + " for project: " + project.getId() + " cannot be loaded from relative path: " + parentDescriptor + "; path does not exist." );
|
||||||
}
|
}
|
||||||
|
|
||||||
parentDescriptor = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( parentDescriptor != null )
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
parentDescriptor = parentDescriptor.getCanonicalFile();
|
parentDescriptor = parentDescriptor.getCanonicalFile();
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Failed to canonicalize potential parent POM: \'" + parentDescriptor + "\'", e );
|
getLogger().debug( "Failed to canonicalize potential parent POM: \'" + parentDescriptor + "\'",
|
||||||
|
e );
|
||||||
|
|
||||||
parentDescriptor = null;
|
parentDescriptor = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( parentDescriptor != null && parentDescriptor.exists() )
|
if ( parentDescriptor != null && parentDescriptor.exists() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue