Appendix H. Project Components

This file will give you a quick introduction and a reference of the things that you may see in a build files besides tasks and types.

H.1 Phing Projects

Projects are the outermost container for everything in build files. The <project> tag also is the root tag in build files. It contains the name, the directory, a short description and a default target.

Project may contain task calls and targets (see below).

H.1.1 Example

<?xml version="1.0" ?>

<project name="TestProject" basedir="." default="main"
         description="This is a test project to show how to use projects ;-)">

  <!-- Everything else goes here -->

Phing allows declaring tasks outside targets. Note that these tasks are evaluated before any targets are executed.

H.1.3 Attributes

Table H.1: Attributes

basedirStringThe base directory of the project, i.e. the directory all paths are relative to.n/aNo
defaultStringThe name of the target that is executed if none is explicitly specified when calling PhingallYes
descriptionStringA free text description of the projectn/aNo
nameStringName of the projectn/aNo
phingVersionStringThe minimum Phing version required to execute the build file, in order to prevent compatibility issues.n/aNo
strictBooleanEnables the strict-mode for the project build process. If enabled, a warning would be considered as an error, and the build will be aborted.falseNo