I'm trying to make an Ant target that runs if ONE of two other targets completes. Basically, assuming I have three targets A1, A2, and B, I want B to run only if A1 OR A2 run. A1 and A2 depend on a condition, so either A1 or A2 will run (but never both).
For example:
<target name="A1" if="${conditionalVar}">
<target name="A2" unless="${conditionalVar}">
<target name="B" depends="????????">
What should the 'depends' for target B be? Is there anyway to do this?