title: How to transform property into multiple arguments to <exec> task
body: <p>I have a property that contains multiple values, and I want to execute a command with a separate "-j" argument for each value in the property.</p>
  
  <p>E.g. <code>&lt;property name="arguments" value="foo bar hello world"/&gt;</code></p>
  
  <p>Should execute: mycommand -j foo -j bar -j hello -j world</p>
  
  <p>I'm using Ant 1.7.1, so I can't use the "prefix" attribute (Ant 1.8) on the <code>&lt;arg&gt;</code> element of an <code>&lt;exec&gt;</code> task.</p>
  
  <p>One workaround is to insert the "-j" directly into the property by hand and then use the "line" attribute of <code>&lt;arg&gt;</code>:</p>
  
  <pre><code>&lt;property name="args" value="-j foo -j bar -j hello -j world"/&gt;
  &lt;exec executable="mycommand"&gt;
      &lt;arg line="${args}"/&gt;
  &lt;/exec&gt;
  </code></pre>
  
  <p>...But I prefer to have the property be a simple list without the embedded arguments.</p>
  
  <p><strong>Edit</strong>: Actually, my arguments are paths within an XML file, so a more accurate argument list would be:</p>
  
  <pre><code>&lt;property name="arguments" value="/foo/bar /hello/world /a/very/long/path"/&gt;
  </code></pre>
  
  <p>I would like the command to then execute with arguments: "-j /foo/bar -j /hello/world -j /a/very/long/path".  Note that the slashes remain forward slashes even under Windows (these are arguments to a command, not filenames).</p>