ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Attempt at "if-like" task
Date Tue, 11 Sep 2001 09:42:27 GMT
On Thu, 30 Aug 2001, Ceki Gülc <> wrote:

> There is no need to change the ANT architecture to accommodate
> complex boolean expressions.

Have you seen the <condition> task new to Ant 1.4?  It handles "basic"
boolean expressions quite well, but having the power of a scripting
language would probably make things easier.

When I read your mail the idea of a "script" condition formed in my
mind, something like

<condition property="someprop">
  <script language="javascript">
    foo == bar

using BSF and giving the script snippets the same access to Ant
properties, references and all the stuff scripts run via the <script>
task have - we would require the script to return a boolean, though.

This is not as powerful as your "if-like" task, but everything beyond
the evaluation of a boolean expression would probably better be run
inside a <script> task anyway IMHO.

What do you think?


View raw message