Understanding phases
a phase is a kind of target with special features:
- have no body, only dependencies
- dependencies are created on the fly (when a target is assigned to a phase)
- order of dependencies is not guaranteed
- are not prefixed in 'include', and never overriden
This is useful to make build modules easily reusable in a standard build (with standard phases), without requiring any specific orchestration.
Example
module A:<phase name="foo" description="do foo" />module B:
<target name=":bar" phase="foo" >
<dobar />
</target>
<ea:include module="A"/>By calling to
<target name=":another-bar" phase="foo" >
easyant fooYou will run ALL the targets bound the "foo" phase (:bar and :another-bar in my previous example)
In a module plugin it's possible to assign a target to a phase which is not declared in the build module. It makes the module dependent on the caller to declare the phase prior to the use call, and as such becomes a requirement of the module.