ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Call for patches
Date Tue, 23 May 2000 15:18:54 GMT
>>>>> "EB" == Eugene Bekker <> writes:

 EB> I notice there are more and more requests to beef up the logic
 EB> support for tasks, like IFNOT and multiple IFs.  One thing to
 EB> consider is to drop in an existing logic parser, that would allow
 EB> nested and more complicated boolean statements, such as Mozilla's
 EB> Rhino JavaScript engine.

Did you notice the optional script task? It uses BSF as its framework
and Rhino amongst others is supported by it.

Probably using scripts would make a lot of the conditional compilation
stuff easier. Let's assume that project properties, targets and tasks
are exposed to the scripting language in some way, so you could write

<script language="JavaScript">
    target["targetid"].setCondition(cond1 || (cond2 && !cond3));

where cond1 may have been calculated by other tasks executed before
this one or set by command line properties or ...

The drawback of this is that Ant would start to depend on BSF (or any
other scripting framework for that matter).


View raw message