ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Duncan Davidson <>
Subject Re: [PROPOSAL] Enhancement to available task
Date Mon, 08 Jan 2001 05:53:38 GMT
On 1/5/01 11:32 AM, "Rob Oxspring" <> wrote:
> I may be being daft, but I can't see how this could easily build up "or"s -
> assuming that these things are "and"ed together -
> however if the available task also took a "operation" attribute, the task
> could combine the conditions appropriately... Example steeling from Ceki
> Gulcu's "Conditional compilation" request:
> <available property="case1" operation="and">
>   <if ...test for JNDI... />
>   <if ...test for JMS... />
> </available>
> <available property="case2" operation="or">
>   <if ...test for JAXP from Sun... />
>   <if ...test for Xerces... />
> </available>

I may being daft as well here as both of these examples are a bit

However, given the following thoughts:

    *) if/unless attributes check for true/false/1/0 values in a prop
    *) it should be possible to write a task that sets a prop to

It should be possible to provide this logic as a task -- which might be
abstracted a bit more:

<setproperty property="foo" value="true" combination="any|all|none">
  <classpresent class="javax.xml.parsers.DOMBuilder"/>

That way you can set up a Task for setting properties using some large
number of possibilities.

James Duncan Davidson                              
                                                                  !try; do()

View raw message