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

Reply via email to