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