May 2002
Intermediate to advanced
288 pages
10h 50m
English
taskdef
Adds a task to the current project. This is used to define tasks not
already defined in the
ant.jar’s
default.properties file.
classname (all, String, *)The class that implements the task.
classpath (all, Path, N)The classpath to use.
file (1.4, File, N)The name of a properties file containing one or more task definitions. Each line is formatted like this:
taskname=full.package.name.TaskClass
name (all, String, *)The name of the task.
resource (1.4, String, N)The Java resource name of a properties file containing one or more
task definitions. This is identical to the file
attribute, except it uses a ClassLoader to locate
the properties file.
The name and classname
attributes are required unless the file or
resource attributes are specified.
<classpath> elements (all)May be used in place of the classpath attribute.
Defines a custom task that can then be used throughout a project:
<taskdef name="mycodegen" classname="com.foobar.tasks.MyCodeGen"/>
Read now
Unlock full access