@NotAgain's answer is useful if the target to be excluded is at the beginning or the end of the chain, but it does involve setting up a new target, or at least editing the existing one.
The best solution I've found so far is to use the conditional logic expressions. Example:
<property name="runThis" value="true" />
<target name="runIfPropTrue" if="${runThis}">
<exec program="test.bat" />
</target>
This way you can set up any targets you may wish to exclude and switch them on and off by editing the property or by passing it in as a parameter instead.
I assume you can use the unless
expression just as easily but I haven't tested it.