maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/plugin OgnlProjectValueExtractor.java
Date Mon, 20 Sep 2004 03:07:32 GMT
jvanzyl     2004/09/19 20:07:32

  Modified:    maven-core/src/main/java/org/apache/maven/plugin
                        OgnlProjectValueExtractor.java
  Log:
  o allow system properties to get passed through as parameters to plugins
  
  Revision  Changes    Path
  1.9       +6 -16     maven-components/maven-core/src/main/java/org/apache/maven/plugin/OgnlProjectValueExtractor.java
  
  Index: OgnlProjectValueExtractor.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/OgnlProjectValueExtractor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- OgnlProjectValueExtractor.java	18 Sep 2004 02:24:48 -0000	1.8
  +++ OgnlProjectValueExtractor.java	20 Sep 2004 03:07:32 -0000	1.9
  @@ -104,22 +104,12 @@
           }
           else if ( expression.startsWith( "#" ) )
           {
  -            new Exception( "Got expression '" + expression + "' that was not recognised"
).printStackTrace();
  -/* TODO: this probably isn't needed - log something properly though that is invalid? Probably
should throw exception.
  -            expression = expression.substring( 1 );
  +            // 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.
   
  -            int pathSeparator = expression.indexOf( "/" );
  -
  -            if ( pathSeparator > 0 )
  -            {
  -                value = context.getProject().getProperty( expression.substring( 0, pathSeparator
) )
  -                    + expression.substring( pathSeparator );
  -            }
  -            else
  -            {
  -                value = context.getProject().getProperty( expression );
  -            }
  -*/
  +            value = System.getProperty( expression.substring( 1 ) );
           }
   
           // If we strike out we'll just use the expression which allows
  
  
  

Mime
View raw message