ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lev Zak <>
Subject <property file=... problem
Date Tue, 19 Feb 2002 17:28:15 GMT
I use ANT 1.4.1 on Windows 2000.
I need to compare two properties (build number) that I take from a two
different file.
I have two installation in the different directory (d:/app1 and d:/app2) and
I would like to compare if this is the same build. For this I have a sign of
build number into the file under buildNumber key (e.g.
The part of build.xml target is a following:

<target name="compare_build_number">
    <property name="build.prop.1" value="d:/app1/"/>
    <property name="build.prop.2" value="d:/app2/"/>
    <property file="${build.prop.1}"/>
    <property name="app1_ver" value="${buildNumber}"/>
    <property file="${build.prop.2}"/>
    <condition property="it_is_the_same_build">
        <equals arg1="${app1_ver"}" arg2="${buildNumber}"/>
. . .

I expected two defined values, app1_ver is a buildNumber of first
application (d:/app1/ and buildNumber is a buildNumber of
second application (d:/app2/, before a <condition> task and
I could to compare this values. But it is not happened.  The second
"<property file=" does not work. I tried to separate this target to two
different targets which use "<property file=" each one. It was not helped. I
tried to use "<property resource=" instead of "<property file=". It was not
What is wrong in my build.xml?
What I missed?
And what is the difference between <property resource=" and "<property
file=" ?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message