Does 1.4.1 not support the name attribute for the os tag? ... BUILD FAILED /u/build/acais/build.xml:6: Class org.apache.tools.ant.taskdefs.condition.Os doesn't support the "name" attribute. ...
<condition property="platform" value="macosx"> <os name="Mac OS X" /> </condition> ----- Original Message ----- From: "Dominique Devienne" <[EMAIL PROTECTED]> To: "'Ant Users List'" <[EMAIL PROTECTED]> Sent: Thursday, May 23, 2002 10:17 AM Subject: RE: dynamic properties > 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]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>