maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/plugin PluginParameterExpressionEvaluator.java
Date Fri, 01 Apr 2005 16:14:30 GMT
brett       2005/04/01 08:14:30

  Modified:    maven-core/src/main/java/org/apache/maven/plugin
                        PluginParameterExpressionEvaluator.java
  Log:
  treat empty expressions as non-existant
  
  Revision  Changes    Path
  1.11      +9 -8      maven-components/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
  
  Index: PluginParameterExpressionEvaluator.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PluginParameterExpressionEvaluator.java	16 Mar 2005 06:29:34 -0000	1.10
  +++ PluginParameterExpressionEvaluator.java	1 Apr 2005 16:14:30 -0000	1.11
  @@ -77,8 +77,8 @@
   
                   if ( pathSeparator > 0 )
                   {
  -                    value = getValue( expression.substring( 1, pathSeparator ), context.getProject()
)
  -                        + expression.substring( pathSeparator );
  +                    value = getValue( expression.substring( 1, pathSeparator ), context.getProject()
) +
  +                        expression.substring( pathSeparator );
                   }
                   else
                   {
  @@ -87,7 +87,8 @@
               }
               catch ( Exception e )
               {
  -                throw new PluginConfigurationException( "Error evaluating plugin parameter
expression: " + expression, e );
  +                throw new PluginConfigurationException( "Error evaluating plugin parameter
expression: " + expression,
  +                                                        e );
               }
           }
           else if ( "#settings".equals( expression ) )
  @@ -104,8 +105,8 @@
   
               if ( pathSeparator > 0 )
               {
  -                value = context.getProject().getFile().getParentFile().getAbsolutePath()
  -                    + expression.substring( pathSeparator );
  +                value = context.getProject().getFile().getParentFile().getAbsolutePath()
+
  +                    expression.substring( pathSeparator );
               }
               else
               {
  @@ -147,14 +148,14 @@
           // mojo descriptor.
           // ----------------------------------------------------------------------
   
  -        if ( value == null && !expression.startsWith( "#" ) )
  +        if ( value == null && expression.length() > 0 && !expression.startsWith(
"#" ) )
           {
               value = expression;
           }
   
           return value;
       }
  -    
  +
       private static Object getValue( String expression, MavenProject project )
           throws Exception
       {
  
  
  

Mime
View raw message