Possible Duplicate:
Ant task to check if a file exists?
<target name="buildjunit">
<mkdir dir="${BUILD_TEST_DIR}" />
<ant antfile="build.xml" dir="${app}\dcs" target="compile-junit" inheritAll="false">
<property name="BUILD" value="${COMP_BUILD}" />
<property name="VER" value="${PREVIOUS_VERSION}" />
<property name="build.local" value="true" />
<property name="CONFIG" value="${CONFIG_HOME}/ESW/ESWCONFIG/ITT" />
</ant>
</target>
I want to build ant target compile-junit only if some of the jar doesnt exist in perticulary directory, how can i do it? ie compile-junit target inside buidljunit should run only when there is no jar file exist in the directory project/jarlocation/dcs.