Imported files are treated as they are present in the main buildfile. This makes it easy to understand, but it makes it impossible for them to reference files and resources relative to their path. Because of this, for every imported file, Phing adds a property that contains the path to the imported buildfile. With this path, the imported buildfile can keep resources and be able to reference them relative to its position.
So if I import for example a docs/build.xml
file named
builddocs
, I can get its path as
phing.file.builddocs
, similarly to the
phing.file
property of the main buildfile. Additionally,
the directory will be stored in phing.dir.builddocs
.
Note that "builddocs" is not the filename, but the name attribute present in the imported project tag.
If import file does not have a name attribute, the
phing.file.projectname
and phing.dir.projectname
properties will not be set.