ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Clark <robert.cl...@quest.com>
Subject Re: Am I completely misunderstanding the fail/unless task?
Date Wed, 03 May 2006 19:39:17 GMT
On Wednesday May 3, 2006 15:31, "Trent Ohannessian" <tohann@gmail.com> 
wrote:

>     <fail unless="${env}" >
>

> BUILD FAILED
> D:\Open Source Projects\Canoo Web Test\my_tests\webtest.xml:3:
> Missing environment parameter.
>
>         Here is env: dev
>
>         Usage:
>                 webtest -buildfile webtest.xml -Denv=[dev | qa |
> stg | prod]
>
> Total time: 0 seconds
>
> How can this be failing when when env is printed out in the failure
> message?

The "unless" attribute of the <fail/> task takes the name of a 
property, not its value. In this case you need to re-write the test 
as:

<fail unless="env">
   ....
</fail>

- Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message