The following comment has been added to this issue:

     Author: Matthias Kerkhoff
    Created: Thu, 6 Jan 2005 3:19 AM
       Body:
PMFYI, you are getting more '0' results because the jexl version included with 
maven (upto maven 1.0.2) is quite outdated and doesn't evaluate all operators 
correctly (only + and - do work, more or less). 
Jexl 1.0 supports quite a lot of operators.

I think that the behaviour is correct as ${x OP y} is a valid JEXL expression 
although it is at the same time a valid ANT property name.

To get the expected behaviour, add the following lines to the test:

    <echo>my.dir=${context.getVariable('my.dir')}</echo>
    <echo>my_dir=${context.getVariable('my_dir')}</echo>
    <echo>my+dir=${context.getVariable('my+dir')}</echo>
    <echo>my-dir=${context.getVariable('my-dir')}</echo>
    <echo>my*dir=${context.getVariable('my*dir')}</echo>
    <echo>my/dir=${context.getVariable('my/dir')}</echo>
    <echo>my%dir=${context.getVariable('my%dir')}</echo> 

That gives the expected results as getVariable() will just check the variable 
map for the given keys w/o evaluating them as expressions, at least with maven 
1.0.2

---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MAVEN-1521?page=comments#action_28666

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MAVEN-1521

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1521
    Summary: loading properties file via Ant property task does not work from 
maven.xml
       Type: Bug

     Status: Reopened
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             jelly/ant integration
   Fix Fors:
             1.1-beta-1
   Versions:
             1.0.1

   Assignee: dion gillard
   Reporter: Ian Springer

    Created: Tue, 30 Nov 2004 12:44 PM
    Updated: Thu, 6 Jan 2005 3:19 AM
Environment: n/a

Description:
If I have the following line in maven.xml, either within a goal or outside of 
any goals:

<property file="my.properties" />  

where my.properties exists and is a valid Java props file, any properties that 
are in my.properties end up with a value of "0" (yes, simply the zero 
character) in Maven.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to