Check jar file existance : Existance Check « Ant « Java Tutorial






<?xml version="1.0"?>
<project name="Apache Ant Properties Project" basedir=".">
  
  <property name="jstl.jar" value="jstl.jar"/> 
  
  <condition property="jstl.jar.exists">
    <available file="${jstl.jar}" filepath="./lib"/>
  </condition>
  <target name="build-jstl" depends="checkout-jstl" unless="jstl.jar.exists">
    <echo message="Building ${jstl.jar}"/>
  </target>

</project>








38.9.Existance Check
38.9.1.Check jar file existance
38.9.2.Check existance of source code