ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Property element of ant task needs an "if"
Date Fri, 12 Jul 2002 01:47:49 GMT
--- Scott Ellsworth <> wrote:
> As an alternative, if we had a nested "inheritproperty" element that 
> forwarded just the property named, I could accomplish this end.

But that wouldn't really be the same as your proposed if/unless addition,
would it? If it's just passing the named property, then it's not allowing
for it to take on a new value, as it did in your if/unless example, where
you explicitly set the value to "orange". Also, you should keep in mind,
when dealing with this stuff, that there's the whole
anything-defined-on-the-command-line thing...

If you are going to try and do an <inheritproperty> element, you may want
to consider adding a <propertyset> datatype, so you wouldn't have to list
all the same properties to pass every time.

In the meantime, you can always just fall back on the <if> task:
  <target name="juice">
      <isset property="juice"/>
        <ant antfile="blend.xml" target="blendit" inheritall="false">
          <property name="juice" value="orange"/>
        <ant antfile="blend.xml" target="blendit" inheritall="false"/>

A bit long-winded, but it does get you there.



Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free

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

View raw message