blob: ec6250abec4610073a7423d6bc7cf697b752d654 [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Ant User Manual</title>
</head>
<body>
<h2><a name="taskdef">Taskdef</a></h2>
<h3>Description</h3>
<p>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.</p>
<p>Taskdef should be used to add your own tasks to the system. See also &quot;<a
href="../develop.html#writingowntask">Writing your own task</a>&quot;.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">name</td>
<td valign="top">the name of the task</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">classname</td>
<td valign="top">the full class name implementing the task</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">classpath</td> <td valign="top">the classpath to
use when looking up <code>classname</code>.</td> <td
align="center" valign="top">No</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>classpath</h4>
<p><code>Taskdef</code>'s <i>classpath</i> attribute is a <a
href="../using.html#path">PATH like structure</a> and can also be set via a nested
<i>classpath</i> element.</p>
<h3>Examples</h3>
<pre> &lt;taskdef name=&quot;myjavadoc&quot; classname=&quot;com.mydomain.JavadocTask&quot;/&gt;</pre>
<p>makes a task called <code>myjavadoc</code> available to Ant. The class <code>com.mydomain.JavadocTask</code>
implements the task.</p>
<hr>
<p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>