<sound>

If the Java you are running is greater than 1.3, you might want to consider adding a little sound to your builds. This is a particularly good idea for ones that might take a little longer than normal, so an audible signal to let you know it’s finished could be useful. You can do this using the <sound> task, which has the capability to trigger a sound on either a success or failure of a build file, as shown in the example in Listing 5.21.

Listing 5.21. Integrating a Sound File into the Build Process
 <target name="splash-example"> <splash showduration="1000"/> <property name="sound" value="true"/> </target> <target name="sound-example" if="sound" depends="splash-example"> <sound> <success source="c:\\sounds\\complete.wav"/> <fail source="c:\\sounds\\redalert.wav" ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.