See http://marc.theaimsgroup.com/?l=ant-user&m=102201011129362&w=2 .
<condition> just sets a property if it's elements are true. Then you must use targets and proper dependencies between them to perform something conditionally. What you want to do is only support by ant-contrib's <if> task (search archive for info on it). --DD -----Original Message----- From: G.L. Grobe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 11:37 PM To: Ant Users List Subject: Re: dynamic properties I'm using 1.4.1. Something here I am not understanding. I see how to set the property, but how do I test the property to know what paths to use here. <condition property="acais.osrunning" value="Linux"> <equals arg1="${os.name}" arg2="Linux"> <property name="jboss.dir" value="/u/public/JBoss-2.4.4_Tomcat-4.0.1"/> <property name="home.dir" value="/u/build/acais"/> <property name="build.dir" value="/u/build/acais-temp"/> <property name="release.dir" value="/u/build/acais-release"/> </equals> <equals arg1="${os.name}" arg2="Mac OS X"> <property name="jboss.dir" value="/u/public/JBoss-2.4.4_Tomcat-4.0.1"/> <property name="home.dir" value="/u/build/acais"/> <property name="build.dir" value="/u/build/acais-temp"/> <property name="release.dir" value="/u/build/acais-release"/> </condition> I'm trying to do the following logic ... <condition property="platform" value="Linux"> <os name="Linux"> </condition> I'd then like to say something like ... (it's wrong, but read as ...) <if os.name == "linux"> <property name="my.dir" value="this.path"/> <elseif os.name == "mac"> <property name="my.dir" value="that.path"/> </if> > > Using Ant 1.4.1, what's the best way to test if a property is of a > > certain value so that I may set other props ... > > The <equals> element of <condition>. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>