o Ensured we eventually work with absolute paths

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@777134 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-21 14:37:03 +00:00
parent 9aae6eaa67
commit add87f5f56
2 changed files with 7 additions and 2 deletions

View File

@ -185,7 +185,7 @@ public class DefaultMaven
protected Map<String,MavenProject> getProjects( MavenExecutionRequest request )
throws MavenExecutionException, ProjectBuildingException
{
List<File> files = Arrays.asList( new File[] { request.getPom() } );
List<File> files = Arrays.asList( request.getPom().getAbsoluteFile() );
Map<String,MavenProject> projects = collectProjects( files, request );

View File

@ -77,10 +77,15 @@ public class DefaultMavenExecutionRequestPopulator
// POM
//
// If we are not given a specific POM file, but passed a base directory
// then we will use a release POM in the directory provide, or and then
// then we will use a release POM in the directory provided, and then
// look for the standard POM.
// ------------------------------------------------------------------------
if ( request.getPom() != null && !request.getPom().isAbsolute() )
{
request.setPom( request.getPom().getAbsoluteFile() );
}
if ( ( request.getPom() != null ) && ( request.getPom().getParentFile() != null ) )
{
request.setBaseDirectory( request.getPom().getParentFile() );