akonsu
akonsu

Reputation: 29536

ant: order of execution of "depends" target?

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?

Upvotes: 7

Views: 5831

Answers (2)

Brandon Hulsebusch
Brandon Hulsebusch

Reputation: 96

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.

Upvotes: 8

M A
M A

Reputation: 72844

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)...

Upvotes: 7

Related Questions