I have a target that I only want to execute if a property is set, but it
executes the dependencies regardless.  
The code looks like this:
 
    <target name="cruisecleanup" depends="init, clean, prepare,
_cruisecleanup" if="cruise.logs.dir" />
 
What I have used as a work around is:
 
    <target name="cruisecleanup" depends="" if="cruise.logs.dir" />
       <runtarget target="run-cruisecleanup">
    </target>
 
    <target name="run-cruisecleanup" depends="init, clean, prepare,
_cruisecleanup" />
 
This works, but it doesn't seem very ANT like.  Do folks have a better,
way to perform the conditional execution with a dependency list?
 
Thanks, Eric
 

Reply via email to