[MNG-1493] Modifying to allow <module> to specify a full path, including alternate pom file, rather than just a directory wherein a normal 'pom.xml' is expected to reside. This works more like <relativePath> has worked for awhile now.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@618780 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2008-02-05 21:27:53 +00:00
parent ad27233c7c
commit 04ad40121c
1 changed files with 13 additions and 14 deletions

View File

@ -350,8 +350,13 @@ public class DefaultMaven
continue; continue;
} }
File moduleFile; File moduleFile = new File( basedir, name );
if ( !moduleFile.exists() )
{
throw new MissingModuleException( name, moduleFile, file );
}
else if ( moduleFile.isDirectory() )
{
if ( usingReleasePom ) if ( usingReleasePom )
{ {
moduleFile = new File( basedir, name + "/" + Maven.RELEASE_POMv4 ); moduleFile = new File( basedir, name + "/" + Maven.RELEASE_POMv4 );
@ -360,6 +365,7 @@ public class DefaultMaven
{ {
moduleFile = new File( basedir, name + "/" + Maven.POMv4 ); moduleFile = new File( basedir, name + "/" + Maven.POMv4 );
} }
}
if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
{ {
@ -379,15 +385,8 @@ public class DefaultMaven
moduleFile = new File( moduleFile.toURI().normalize() ); moduleFile = new File( moduleFile.toURI().normalize() );
} }
if ( !moduleFile.exists() )
{
throw new MissingModuleException( name, moduleFile, file );
}
else
{
moduleFiles.add( moduleFile ); moduleFiles.add( moduleFile );
} }
}
List collectedProjects = collectProjects( moduleFiles, localRepository, recursive, List collectedProjects = collectProjects( moduleFiles, localRepository, recursive,
globalProfileManager, false ); globalProfileManager, false );