title: Ant Exec environment var
body: <p>I have a problem where I don't want to have to call a setEnv.sh file before i call my ant target that calls an exec task.</p>
  
  <p>Right now I have a way to save the environment variables in setenv.properties file in the 
  key=value notation.</p>
  
  <p>The exec task for some reason does not see the variables that are set in the .properties file....
  (I know i could use the env tag but the setenv.properties is dynamically generated)</p>
  
  <p>setenv.properties:</p>
  
  <pre><code>HELLO=XYZ
  </code></pre>
  
  <p>part of my build.xml  :</p>
  
  <pre><code>&lt;property file="setenv.properties"/&gt;
  &lt;target name="test" depends="setEnv"&gt;
     &lt;exec  executable="/bin/ksh" newenvironment="false"&gt;
       &lt;arg value="test.ksh" /&gt; 
     &lt;/exec&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>test.sh :</p>
  
  <pre><code>echo ${HELLO}
  </code></pre>
  
  <p>Any thoughts?</p>