next up previous contents index
Next: SourceOffSite Up: Sound Previous: Nested Element Parameters   Contents   Index

Examples

<target name="fun" if="fun" unless="fun.done">
  <sound>
    <success source="${user.home}/sounds/bell.wav"/>
    <fail source="${user.home}/sounds/ohno.wav" loops="2"/>
  </sound>
  <property name="fun.done" value="true"/>
</target>
plays the bell.wav sound-file if the build succeeded, or the ohno.wav sound-file if the build failed, three times, if the fun property is set to true. If the target is a dependency of an "initialization" target that other targets depend on, the fun.done property prevents the target from being executed more than once.
<target name="fun" if="fun" unless="fun.done">
  <sound>
    <success source="//intranet/sounds/success"/>
    <fail source="//intranet/sounds/failure"/>
  </sound>
  <property name="fun.done" value="true"/>
</target>
randomly selects a sound-file to play when the build succeeds or fails.



Andrew Marlow 2003-07-08