ant: order of execution of "depends" target?
Asked Answered
F

2

7

if I have

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

is there a deterministic order of execution of targets B and C? Are they executed one after the other in the order of their appearance in the list, are they executed in parallel? Does C wait for B to finish?

Fibrinolysis answered 8/9, 2016 at 18:32 Comment(0)
L
8

They are executed one after the other. C will not start until B finishes.

Furthermore, the 'if' clause is not checked until after the 'depends' targets are executed.

Laine answered 8/9, 2016 at 19:22 Comment(0)
S
7

It's in the order of appearance in the list. See https://ant.apache.org/manual/targets.html:

Ant tries to execute the targets in the depends attribute in the order they appear (from left to right)...

Snoopy answered 8/9, 2016 at 18:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.