o make sure that the execution properties that are taken from the CLI are processed before anything else

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@701694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-10-04 19:20:15 +00:00
parent f4de864984
commit 4770c52af5
1 changed files with 17 additions and 15 deletions

View File

@ -86,7 +86,7 @@ public class PluginParameterExpressionEvaluator
this.logger = logger;
this.properties = properties;
project = context.getCurrentProject();
String basedir = null;
if ( project != null )
@ -223,6 +223,21 @@ public class PluginParameterExpressionEvaluator
"\' instead." );
}
// We will attempt to get nab a system property as a way to specify a
// parameter to a plugins. My particular case here is allowing the surefire
// plugin to run a single test so I want to specify that class on the cli
// as a parameter.
if ( properties != null )
{
value = properties.getProperty( expression );
if ( value != null )
{
return value;
}
}
if ( "localRepository".equals( expression ) )
{
value = context.getLocalRepository();
@ -381,23 +396,10 @@ public class PluginParameterExpressionEvaluator
if ( value == null )
{
// The CLI should win for defining properties
if ( ( value == null ) && ( properties != null ) )
{
// We will attempt to get nab a system property as a way to specify a
// parameter to a plugins. My particular case here is allowing the surefire
// plugin to run a single test so I want to specify that class on the cli
// as a parameter.
value = properties.getProperty( expression );
}
if ( ( value == null ) && ( ( project != null ) && ( project.getProperties() != null ) ) )
if ( project != null && project.getProperties() != null )
{
value = project.getProperties().getProperty( expression );
}
}
if ( value instanceof String )