PR: MNG-1394

Submitted By: Edwin Punzalan
Reviewed By: John Casey

Applied. Thanks, Edwin!

NOTE: I added a debug statement in the case where relativePath refers to a directory, to tell the user that we're looking for 'pom.xml' in that dir.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@345109 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-11-16 20:35:36 +00:00
parent 524ae18b88
commit ad2dd60452
1 changed files with 17 additions and 0 deletions

View File

@ -880,6 +880,23 @@ public class DefaultMavenProjectBuilder
{ {
parentDescriptor = new File( projectDir, parentRelativePath ); parentDescriptor = new File( projectDir, parentRelativePath );
if ( parentDescriptor.isDirectory() )
{
if ( getLogger().isDebugEnabled() )
{
getLogger().debug(
"Path specified in <relativePath/> (" + parentRelativePath
+ ") is a directory. Searching for 'pom.xml' within this directory." );
}
parentDescriptor = new File( parentDescriptor, "pom.xml" );
if ( !parentDescriptor.exists() )
{
throw new ProjectBuildingException( projectId, "missing parent project descriptor: " + parentDescriptor.getAbsolutePath() );
}
}
try try
{ {
parentDescriptor = parentDescriptor.getCanonicalFile(); parentDescriptor = parentDescriptor.getCanonicalFile();