title: Conditionally redirecting output in ant exec task
body: <p>Is there a way of conditionally redirecting the output to property or the stdout stream as the non-working example below?</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;macrodef name="mytask"&gt;
    &lt;attribute name="output" default="STDOUT"/&gt;
    &lt;sequential&gt;
        &lt;exec executable="my.exe" outputproperty="@{output}"/&gt;
    &lt;/sequential&gt;
  &lt;/macrodef&gt;
  </code></pre>
  
  <p>The above example redirects the output by default to a property <code>STDOUT</code>. Instead I would like it to be directed to the stdout stream.</p>
  
  <p>I could create mytask_with_stdout as a copy of the above macro and remove the exec outputproperty, but that would violate the DRY principle.</p>
  
  <p>Is there some nice way of doing this?</p>