Appendix B. Core tasks

This appendix contains a reference of all core tasks, i.e. all tasks that are needed to build a basic project.

This reference lists the tasks alphabetically by the name of the classes that implement the tasks. So if you are searching for the reference to the<copy>tag, for example, you will want to look at the reference ofCopyTask.

B.1 AdhocTaskdefTask

The AdhocTaskdefTask allows you to define a task within your build file.

Note that you should use <![CDATA[ ... ]]> so that you don't have to quote entities within your <adhoc-task></adhoc-task> tags.

Table B.1: Attributes

NameTypeDescriptionDefaultRequired
nameStringName of XML tag that will represent this task.n/aYes

B.1.1 Examples

<target name="main"
    description="==>test AdhocTask ">

    <adhoc-task name="foo"><![CDATA[
        class FooTest extends Task {
            private $bar;

            function setBar($bar) {
                $this->bar = $bar;
            }

            function main() {
                $this->log("In FooTest: " . $this->bar);
            }
        }
    ]]></adhoc-task>

    <foo bar="B.L.I.N.G"/>
</target>