mirror of https://github.com/apache/maven.git
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:
parent
524ae18b88
commit
ad2dd60452
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue