ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: "if" attribute to "arg"
Date Mon, 10 Nov 2003 07:50:34 GMT
> On Friday, November 7, 2003, at 06:37  AM, Hynes Fintan wrote:
> > Try this... it is rather ugly, though.
> > (There is probably a simpler way.. anyone?)
> 
> I'm on my way out the door, so don't have time to flesh this out, but 
> using <condition> with property="arg" value="-p" using an <isset>, 
> along with <arg line="${arg}"/> would probably do the trick.


Exactly that :-)


<condition property="opt.p" value="-p">
    <isset property="do.p"/>
</condition>
<property name="opt.p" value=""/>

<condition property="opt.help" value="-help">
    <isset property="do.help"/>
</condition>
<property name="opt.help" value=""/>

<java,exec,...>
    <arg line="${opt.p} ${opt.help}"/>
</java,exec>



Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message