MNG-2347 MavenExecutionRequest.getBaseDirectory() should be propagated to the ${basedir} expression

Submitted by: Ovidio Mallo


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@543240 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-05-31 19:59:38 +00:00
parent da10710224
commit 78aa1f1879
1 changed files with 9 additions and 0 deletions

View File

@ -106,6 +106,11 @@ public class PluginParameterExpressionEvaluator
}
}
if ( basedir == null && context != null )
{
basedir = context.getExecutionRootDirectory();
}
if ( basedir == null )
{
basedir = System.getProperty( "user.dir" );
@ -404,6 +409,10 @@ public class PluginParameterExpressionEvaluator
{
basedir = project.getFile().getParentFile();
}
else if ( context != null && context.getExecutionRootDirectory() != null )
{
basedir = new File( context.getExecutionRootDirectory() ).getAbsoluteFile();
}
else
{
basedir = new File( "." ).getAbsoluteFile().getParentFile();