# Ant User Manual

## Taskdef

### Description

Adds a task definition to the current project, such that this new task can be used in the current project. Two attributes are needed, the name that identifies this task uniquely, and the full name of the class (including the packages) that implements this task.

Taskdef should be used to add your own tasks to the system. See also "Writing your own task".

### Parameters

Attribute | Description | Required
name | the name of the task | Yes
classname | the full class name implementing the task | Yes
classpath | the classpath to use when looking up `classname`. | No

### Parameters specified as nested elements

#### classpath

`Taskdef`'s classpath attribute is a PATH like structure and can also be set via a nested classpath element.

### Examples

      <taskdef name="myjavadoc" classname="com.mydomain.JavadocTask"/>

makes a task called `myjavadoc` available to Ant. The class `com.mydomain.JavadocTask` implements the task.

Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.