ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sills" <>
Subject RE: optional depends for targets
Date Fri, 22 Jul 2011 11:06:00 GMT
This is how I deal with that: simply set up two (I call them) synthetic targets. One depends
on A and C, the other on B, A, and C. Then call one or the other of them. They only need the

<target name="buildForProduction" depends="B,A,C"/>

-----Original Message-----
From: Vimil Saju [] 
Sent: Thursday, July 21, 2011 5:17 PM
To: Ant Users List
Subject: optional depends for targets


Is it possible for a target to optionally depend on another target? For example considerĀ 

target A has an optional dependency on target BĀ 
target C depends on target A

When the build is invoked with target C then only targets A and C should get executed in the
order A,C. However if the build is invoked with targets C,B,A then the targets should be executed
in the order B, A, C.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message