Hello, One thing to add, in Java Development with Ant page 71, Erik Hatcher points that <available> breaks the rule of properties' immutability and advices of not relying in this hole, since it might be fixed as it is now.
Ivan --- "Oleg S. Estekhin" <[EMAIL PROTECTED]> wrote: > Hello > > The properties in Ant 1.6 are immutable (see the > second paragraph at > http://ant.apache.org/manual/CoreTasks/property.html). > You will have to use different property in each > condition. > > > > -----Original Message----- > > From: Hedstrom, Brian > [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, May 25, 2004 5:29 PM > > To: [EMAIL PROTECTED] > > Subject: Propery override in ant 1.6.1 vs 1.4.1 > > > > > > Hello, > > > > I just upgraded my Ant module from 1.4.1 to 1.6.1 > and am having build > > problems. In particular, I traced a problem down > to a set of condition > > statements as shown below: > > <condition property="locationModule" > value="common"> > > <and> > > <available > file="${base.src}/${module.path}/common" > > type="dir"/> > > <not> > > <equals arg1="${jar.common}" > arg2="false"/> > > </not> > > </and> > > </condition> > > <echo message="jar.CSS: locationModule resolved > to ${locationModule}"/> > > <antcall target="jar.CSModule"/> > > > > <condition property="locationModule" > value="client"> > > <and> > > <available > file="${base.src}/${module.path}/client" > > type="dir"/> > > <not> > > <equals arg1="${jar.client}" > arg2="false"/> > > </not> > > </and> > > </condition> > > <echo message="jar.CSS: locationModule resolved > to ${locationModule}"/> > > <antcall target="jar.CSModule"/> > > > > <condition property="locationModule" > value="server"> > > <and> > > <available > file="${base.src}/${module.path}/server" > > type="dir"/> > > <not> > > <equals arg1="${jar.server}" > arg2="false"/> > > </not> > > </and> > > </condition> > > <echo message="jar.CSS: locationModule resolved > to ${locationModule}"/> > > <antcall target="jar.CSModule"/> > > > > Under Ant 1.4.1 this worked fine. Now, under Ant > 1.6.1, the > > first condition > > statement works fine. But when it gets to the > second and third condition > > statements, Ant will not allow the condition > variable > > 'locationModule' to be > > overriden with the new "client" or "server" value. > I get the following > > output (for the second condition statement) when I > turn on Trace debugging > > in Ant: > > Condition true; setting locationModule to client > > Override ignored for property locationModule > > jar.CSS: locationModule resolved to common > > > > Any idea why Ant 1.6.1 treats this differently > than how Ant 1.4.1 handled > > it? How can I resolve this problem and allow the > property override? > > > > Thanks, > > > > Brian Hedstrom > > CarrierAccess > > NetworkValet EMS Product Development > > 303.218.5429 - Office > > 303.218.5629 - Fax > > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
