If a target in the main file is also present in at least one of the imported files, the one from the main file takes precedence.
So if I import for example a docs/build.xml
file named
builddocs
, that contains a "docs
"
target, I can redefine it in my main buildfile and that is the one that will be
called. This makes it easy to keep the same target name, so that the overriding
target is still called by any other targets--in either the main or imported
buildfile(s)--for which it is a dependency, with a different implementation. The
target from docs/build.xml
is made available by the name
"builddocs.docs
". This enables the new implementation to call
the old target, thus enhancing it with tasks called before or after it.