o if an expression evaluates to null then let it let it go through so that it can be examined by the minimal validation now present.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-09-30 15:47:49 +00:00
parent bdcd0670ed
commit 4a14895569
1 changed files with 10 additions and 5 deletions

View File

@ -81,8 +81,7 @@ public class OgnlProjectValueExtractor
}
catch ( OgnlException e )
{
throw new PluginConfigurationException(
"Error evaluating plugin parameter expression: " + expression, e );
throw new PluginConfigurationException( "Error evaluating plugin parameter expression: " + expression, e );
}
}
else if ( expression.equals( "#basedir" ) )
@ -113,10 +112,16 @@ public class OgnlProjectValueExtractor
value = System.getProperty( expression.substring( 1 ) );
}
// If we strike out we'll just use the expression which allows
// people to use hardcoded values if they wish.
// ----------------------------------------------------------------------
// If we strike and we are not dealing with an expression then we will
// will let the value pass through unaltered so that users can hardcode
// literal values. Expressions that evaluate to null will be passed
// through as null so that the validator can see the null value and
// act in accordance with the requirements laid out in the
// mojo descriptor.
// ----------------------------------------------------------------------
if ( value == null )
if ( value == null && !expression.startsWith( "#" ) )
{
value = expression;
}