You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2008/10/04 21:20:15 UTC
svn commit: r701694 -
/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
Author: jvanzyl
Date: Sat Oct 4 12:20:15 2008
New Revision: 701694
URL: http://svn.apache.org/viewvc?rev=701694&view=rev
Log:
o make sure that the execution properties that are taken from the CLI are processed before anything else
Modified:
maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java?rev=701694&r1=701693&r2=701694&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java Sat Oct 4 12:20:15 2008
@@ -86,7 +86,7 @@
this.logger = logger;
this.properties = properties;
project = context.getCurrentProject();
-
+
String basedir = null;
if ( project != null )
@@ -223,6 +223,21 @@
"\' 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 @@
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 )