Jeroen, Change
this <if
test="${target::exists('${bin}')}"> to <if test="${directory::exists(bin)}"> The
following script shows how to use the target function: <?xml
version="1.0"?> Noel -----Original
Message----- 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 |
- [Nant-users] <if> task to test a target won't work Jeroen Stiekema
- Re: [Nant-users] <if> task to test a target won... Ian MacLean
- Noel Gifford