Tuesday, December 23, 2008

Using Ant to test if a file exist

<project name="appDeployment" basedir="." default="run">
<target name="checkSearchIndexZipFile">
<available file="C:\temp\jaf-1.0.2\activation.jar" property="searchFile.exists"/>
</target>
<target name="test" if="searchFile.exists" >
<echo> running ...</echo>
</target>
<target name="run" depends="checkSearchIndexZipFile,test"/>
</project>

No comments:

Post a Comment