ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin HaleBoyes <kzbo...@yahoo.com>
Subject load a property file based on operating system
Date Thu, 21 Nov 2002 19:48:19 GMT
I have two property files
   build-linux.properties   and
   build-w2k.properties

I'd like to load the proper one based on the operating system
that I'm building my application on.  I tried the following:

<project name="test" default="all" basedir=".">
    <condition property="build.properties.filename"
                  value="build-linux.properties">
        <os name="Linux"/>
    </condition>
    <condition property="build.properties.filename"
                  value="build-w2k.properties">
        <os name="Windows 2000"/>
    </condition>

    <property name="build.properties.filename"
             value="build.properties"/>

    <target name="all">...</target>
</project>

but it doesn't work.  I get the following error message:
file:/home/hb/Work/cml/tmp/build.xml:5:
   Unexpected element "condition"


Any ideas on how to do this?
Thanks,
Kevin.




__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus  Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message