B.2 AdhocTypedefTask

The AdhocTypedefTask allows you to define a datatype within your build file.

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

Table B.2: Attributes

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

B.2.1 Example

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

        <adhoc-type name="dsn"><![CDATA[
            class CreoleDSN extends DataType {
                private $url;

                function setUrl($url) {
                    $this->url = $url;

                function getUrl() {
                  return $this->url;

     <!-- creole-sql task doesn't exist; just an example -->
     <creole-sql file="test.sql">
       <dsn url="mysql://[email protected]/test"/>