title: In Ant, how can I dynamically build a property that references a property file?
body: <p>I am using Input tasks to collect specific property values and I want to concatenate those into one property value that references my properties file.</p>
  
  <p>I can generate the format of the property but at runtime it is treated as a string and not a property reference.</p>
  
  <p>Example properties file:</p>
  
  <pre><code># build.properties
  
  # Some Server Credentials
  west.1.server = TaPwxOsa
  west.2.server = DQmCIizF
  east.1.server = ZCTgqq9A
  </code></pre>
  
  <p>Example build file:</p>
  
  <pre><code>&lt;property file="build.properties"/&gt;
  &lt;target name="login"&gt;
   &lt;input message="Enter Location:" addproperty="loc" /&gt;      
   &lt;input message="Enter Sandbox:" addproperty="box" /&gt;
   &lt;property name="token" value="\$\{${loc}.${box}.server}" /&gt;
   &lt;echo message="${token}"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>When I call login and provide "west" and "1" for the input values, echo will print ${west.1.server} but it will not retrieve the property value from the properties file.</p>
  
  <p>If I hardcode the property value in the message:</p>
  
  <pre><code>&lt;echo message="${west.1.server}"/&gt;
  </code></pre>
  
  <p>then Ant will dutifully retrieve the string from the properties file.</p>
  
  <p>How can I get Ant to accept the dynamically generated property value and treat it as a property to be retrieved from the properties file?</p>