Appendix H. Project Components
Prev |  | Next

# 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 -->

    </project>

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

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`basedir` | `String` | The base directory of the project, i.e. the directory all paths are relative to. | n/a | No
`default` | `String` | The name of the target that is executed if none is explicitely specified when calling Phing | all | Yes
`description` | `String` | A free text description of the project | n/a | No
`name` | `String` | Name of the project | n/a | No
`phingVersion` | `String` | The minimum Phing version required to execute the build file, in order to prevent compatibility issues. | n/a | No

Prev |  | Next
G.15 Selector | Home | H.2 Targets