maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Neubauer <peter_neubauer2...@yahoo.se>
Subject Strange variable behavior in comparison
Date Fri, 22 Aug 2003 08:45:03 GMT
Hi,
I'm having another trouble with variables and imports.
Setting a variable str=1 in my build.properties with
the following goal
<goal name="project:test">
	
	      
    <!--property file="build2.properties"/-->
    
    <!--property file="test.properties"/-->
    <j:set var="str2" value="1"/>
    <!--j:set var="str" value="1"/-->
    <echo>${str2} and ${str}</echo>
    <echo>compare ${str == str2}</echo>
    <echo>compare ${str == '1'}</echo>
    <echo>compare ${str == 1}</echo>
    </goal>

gives me

project:test:
    [echo] 1 and 1
    [echo] compare false
    [echo] compare false
    [echo] compare
BUILD SUCCESSFUL
Total time:  1 seconds

When I remove the property there and import it from
test.properties, everything is fine and I get true 3
times. What is going on here? It seems that the
variables are there but they are not compared.
Even if the property is in both files, jelly screws
up.

Any hints how to fix this? Is it a bug?

/peter


=====
Peter Neubauer
mailto:peter_neubauer2001@yahoo.se

Yahoo! Mail - Gratis: 6 MB lagringsutrymme, spamfilter och virusscan. Se mer på http://se.mail.yahoo.com

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


Mime
View raw message