--- Jesse Glick <[EMAIL PROTECTED]> wrote:

> Matt Benson wrote:
> >> Would it be possible to add if and unless
> attributes to the env and
> >> arg elements used in exec [...]
> > 
> > if it is "defined vs. not defined" you could use
> conditionally
> > defined presetdefs.
> 
> That is a lot more cumbersome however.
> 
> <target name="x">
>    <exec ...>
>      <arg value="-opt" if="opt"/>
>    </exec>
> </target>
> 
> vs. (ack!)
> 
> <target name="x"
> depends="x-predef-with-opt,x-predef-without-opt">
>    <x-exec .../>
> </target>
> <target name="x-predef-with-opt">
>    <presetdef name="x-exec">
>      <exec>
>        <arg value="-opt"/>
>      </exec>
>    </presetdef>
> </target>
> <target name="x-predef-without-opt">
>    <presetdef name="x-exec">
>      <exec/>
>    </presetdef>
> </target>
> 
> Also the number of extra ugly targets you have to
> write is exponential 
> in the number of distinct properties you would like
> to have 
> conditionally affect the form of the task.

Point taken, but this quickly leads back to the
"should all element-level entities support if/unless"?
 Once again, I forget what the arguments were
for/against.  IIRC DD was a supporter of "if/unless
everywhere"; maybe he can summarize off the top of his
head.  ATM I can't think why this would be A Bad
Thing.

-Matt

> 
> -J.
> 
> -- 
> [EMAIL PROTECTED]  x22801  netbeans.org 
> ant.apache.org
>        http://google.com/search?q=e%5E%28pi*i%29%2B1
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to