This is a small piece of code please give a look at it then follow the description....
Peter is trying to explain that you must explicitly specify the property name. Try the following to make your code work:
A better solution would be to make use of operating system tests built into ANT's condition task.