Why not...

Just use Ant?
Luckily, the Ant developers have substantially answered this themselves, here.

Enforce unique task names?
The ExecutionContext works with unique task names, so why not enforce this in the XML? Because it is often useful to repeat a task, especially setup or teardown steps, in different places. Note that the second time the task name is encountered, the ExecutionContext will report it as having successfully run already and it will be skipped.
Each sub-component may have the same setup requirement, so putting the setup task at the component level make sense. However, including them at the sub-component level as well means that the sub-component can be run independently. This helps development and debugging.
However, in recognition that problems can arise, duplicate task names are reported during validation.