I need to check if the properties file exists. If it not exists build.xml must use itself property.
<property file="AntHW.properties"/>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="docdir" location="javadoc"/>
2
Answers
You don’t need to check if it exists. Properties in ant are immutable, once set the values cannot be changed. So you want to import the properties file above your snippet, if the properties exist in that properties file the values are set and will not be overwritten by the snippet.
Maybe you can try
Now properties.available will tell you whether or on the properties file exists.