title: Load variable from a file & pass as arg value in ant build
body: <p>What I want to do is load the contents of a file and sent it to an mxmlc compiler as an argument parameter.<br>
  I can load and read the contents of a file using <code>loadfile</code> and setting a <code>property</code> value say <code>propery="filecontent"</code>. But the problem is I can pass it into the mxmlc (flex) compiler.<br>
  I'm not able to pass it (tried with <code>${filecontent}</code>) to the <code>arg line</code>. Its gives an error: "value contains unknown token 'filecontent'"<br>
  How will I pass the contents of the file as a argument value to a compiler argument?<br>
  Edit:<br>
  The problem is with the <code>include-resource-bundles</code> arguments. When using command line it works. But using ant build doesn't. Do we need to manually provide the name of resource bundles by generating the resource file?</p>
  
  <pre><code>&lt;exec executable="${MXMLC}" dir="${APP_ROOT}/src" &gt;
      &lt;arg line="-locale 'en_US'"/&gt;
    .. .. ..
      &lt;arg line="-include-resource-bundles 'collections,components,containers,controls,core,effects,formatters,layout,modules,skins,states,styles'"/&gt;
      .. .. 
  </code></pre>
  
  <p>
  I'm trying to replace the arguments via something like:</p>
  
  <pre><code>... ....
  &lt;loadfile property="resources" srcFile="${APP_ROOT}/src/resources.txt"/&gt;
  ... ....
  &lt;exec executable="${MXMLC}" dir="${APP_ROOT}/src" &gt;
    ...
      &lt;arg line="-include-resource-bundles '${resources}'"/&gt;
    ....
  &lt;/exec&gt;
  </code></pre>
  
  <p>which doesn't work and gives and error -> <code>command line: Error: configuration variable 'include-resource-bundles' value contains unknown token 'resources'</code></p>
  
  <p>So how to automate this?</p>