Appendix B. Core tasks
Prev |  | Next

# 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 of `CopyTask`.

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

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`name` | `String` | Name of XML tag that will represent this task. | n/a | Yes

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

Prev |  | Next
A.6 The GFDL License | Home | B.2 AdhocTypedefTask