ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harkness, David" <>
Subject RE: <if> problems
Date Wed, 27 Aug 2003 22:22:50 GMT
Lopez, William <> once said:
> I can't get the property force.ejbdeploy to set...due to the way the
> build is set up and the wanted ability to run a specific target
> without triggering the usual dependent targets I tried something
> hokey with the <if> task from ant-contrib. I need to use this
> property in a target in a sub-project (I use <isset> to test for it).
> Here is my target and the output:     
>   <target name="target.ToBuild">
>     <if>
>       <!-- I think this is legal -->
>       <or>
>         <not>
>           <equals arg1="${ejb.tobuild}" arg2="noejb" />
>         </not>
>         <not>
>           <equals arg1="${ejb.tobuild}" arg2="build.all.ejb" />
>         </not>
>       </or>

This will always be true, so your <elseif> will never fire. For it to be
false, the negation must be true. Unless I'm just really spacey today,

  not(not(a) or not(b)) == a and b

    <equals arg1="${ejb.tobuild}" arg2="noejb" />
    <equals arg1="${ejb.tobuild}" arg2="build.all.ejb" />

Which of course can never be true since ${ejb.tobuild} cannot take on
two values simultaneously. Your syntax is legal, but your logic is
incorrect. You said that the property gets set when you
expect it to. Is it also getting set when you expect it not to be, when
ejb.tobuild is "force.ejb.deploy"? If not, then I'm wrong about the

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message