# Appendix F: File Formats

## Build File Format

The following XML file shows a skelleton build file, that only contains a project and a target. See the references for the Phing Types and Tasks for information on how to use them.

    <?xml version="1.0" ?>

    <!--
      The root tag of each build file must be a "project" tag.
    -->
    <project name="(projectname)" [basedir="(projectbasedir)"]
             [default="(targetname)"] [description="(projectdescription)"]>

      <!--
        Type and task calls here, i.e. filesets, patternsets,
        CopyTask calls etc.
      -->

      <target name="(targetname)" [depends="targetname1,targetname2"]
              [if="(ifproperty)"] [unless="(unlessproperty)"]>
        <!--
          Type and task calls here, i.e. filesets, patternsets,
          CopyTask calls, etc.
        -->
      </target>

      <!--
        More targets here
      -->
    </project>

## Property File Format

Property Files define properties. Properties are stored in key/value pairs and may only contain plain text. The suffix of these files should be .properties, the default Property File for a Build File is build.properties

    # Property files contain key/value pairs
    key=value

    # Property keys may contain alphanumeric chars and colons, but
    # not special chars. This way you can create pseudo-namespaces
    myapp.window.hsize=300
    myapp.window.vsize=200
    myapp.window.xpos=10
    myapp.window.ypos=100

    # You can refer to values of other properties by enclosing their
    # keys in "${}".
    text.width=${myapp.window.hsize}

    # Everything behind the equal sign is the value, you do
    # not have to enclose strings:
    text=This is some text, Your OS is ${php.os}

    # I guess that is all there is to property files