ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Wood" <EW...@llbean.com>
Subject target conditional and dependency issue
Date Fri, 22 Aug 2008 15:03:01 GMT
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
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message