Checking two conditions before compiling using Ant build -


i want check presence of dependent files before code compiled. doing following

<available file="xx" property="isxxavailable"/> <available file="yy" property="isyyavailable"/>     

for compilation want check whether both properties true. go ahead compilation

<target name="compile" depends="init" unless="isxxavailable" unless="isyyavailable"> 

is possible check both properties during compiling

you can 'and' 2 'available' condtions single 1 :

<condition property="files.available">   <and>     <available file="xx"/>     <available file="yy"/>   </and> </condition> 

then can use condition in same way doing in target

http://ant.apache.org/manual/tasks/condition.html


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -