Ant Tasks


Before using the tasks they need to be made available to Ant. Please see Installation for instructions.

Using the tasks

To use the tasks in your buildfile you need tell Ant that they are available. To do this add the following line to your buildfile:

<typedef resource="com/preemptive/dasho/anttask/antlib.xml"/>

Depending upon your installation choices you may also need to set the dasho.home property. See Setting DashO Home for details.

Multiple warnings may be emitted by any of the Ant tasks, but the process will stop immediately with an exit code of 1 if an error is encountered.

Tasks Overview

DashO provides five tasks for integration with Apache Ant.

Task Name Description


Create a Shelf Life token. This token can be read in by your application at runtime.


Obfuscates Java applications and libraries using DashO. Obfuscation projects can be created using DashO's user interface or created within the buildfile.


Obfuscates one or more jars using DashO. This provides a quick way to obfuscate a Java library or simple application that does not require any advanced configuration.


Display the contents of a Shelf Life token stored in a file.


Add a watermark to a jar using DashO's PreMark™ watermarker. You can use this task to add a watermark to a jar without obfuscating it.