Adds a task definition to the current ant script. Java with the task class must be added as an external resource.