title: Replacing property dynamically based on environments in Ant scripts
body: <p>I want to develop ant script which replaces application properties with environment specific properties. My requirement is that I will have all environment properties in single <code>env.properties</code> file. During building the application I need to replace with whatever in <code>env.properties</code> file. Ant replace works well when I have property files for each environment.</p>
  
  <p>Sample : env.properties</p>
  
  <pre><code>dev.AddNETWORK_USER=devUser
  dev.ADDPASS=devPass
  sit.AddNETWORK_USER=situser
  sit.ADDPASS=sitPass
  </code></pre>
  
  <p>This needs be replaced in <code>mule.properties</code> as
  for DEV environment:</p>
  
  <pre><code>dev.AddNETWORK_USER=devUser
  dev.ADDPASS=devPass
  </code></pre>
  
  <p>for SIT environment:</p>
  
  <pre><code>AddNETWORK_USER=sitUser
  ADDPASS=sitPass
  </code></pre>