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:51:42 UTC

svn commit: r701702 - /maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Author: jvanzyl
Date: Sat Oct  4 12:51:42 2008
New Revision: 701702

URL: http://svn.apache.org/viewvc?rev=701702&view=rev
Log:
o revert my ordering, i'll have to investigate why property set on the CLI which conflicts with an internal property still wins in 2.0.x

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=701702&r1=701701&r2=701702&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:51:42 2008
@@ -222,21 +222,6 @@
                 mojoDescriptor.getGoal() + "\' has been deprecated. Use \'" + DEPRECATED_EXPRESSIONS.get( expression ) +
                 "\' 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 ) )
         {
@@ -336,6 +321,7 @@
                     value = ReflectionValueExtractor.evaluate( pathExpression, pluginDescriptor );
                     value = value + expression.substring( pathSeparator );
                 }
+                
                 else
                 {
                     value = ReflectionValueExtractor.evaluate( expression.substring( 1 ), pluginDescriptor );
@@ -396,6 +382,16 @@
 
         if ( value == 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.
+
+            if ( properties != null )
+            {
+                value = properties.getProperty( expression );                
+            }                    
+            
             if ( project != null && project.getProperties() != null )
             {
                 value = project.getProperties().getProperty( expression );



Re: svn commit: r701702 - /maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java

Posted by Brett Porter <br...@apache.org>.
On 05/10/2008, at 6:51 AM, jvanzyl@apache.org wrote:

> Author: jvanzyl
> Date: Sat Oct  4 12:51:42 2008
> New Revision: 701702
>
> URL: http://svn.apache.org/viewvc?rev=701702&view=rev
> Log:
> o revert my ordering, i'll have to investigate why property set on  
> the CLI which conflicts with an internal property still wins in 2.0.x

Just out of curiosity, which internal property?

Maybe I'm reading it back to front, but I would consider it a bug in  
2.0.x if the CLI could override project.*, settings.*, etc. (in  
conflict, it should probably be an error), but for every other  
property/expression used in a plugin, the CLI value should always win.

Thanks,
Brett

--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org