try using :
directory:exists() instead [1]. target::exists) is used to check whether a nant target of a given name exists in the currnt buildfile.
Ian
[1]http://nant.sourceforge.net/nightly/help/functions/directory.exists.html
Jeroen Stiekema wrote:
Hi,
I have a problem with the usage of the <if> task. I would like to test if a target exists. If the target exists, the target will be deleted.
<if test="${target::exists('${bin}')}"> <echo message="target exists"/> <delete dir="${bin}"/> </if>
The 'bin' property is set to build\bin. I'm 100% sure the target exists,
but the test will return false, so the if task won't run. When I test the output of 'target::exists("build")' it also says 'false'
(<echo message="${target::exists('build')}"/>). The directory 'build'
does exists.
Can anyone tell me what I'm doing wrong?
Thanks in advance!
Jeroen
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users