title: How to call some Ant target only if some environment variable was not set?
body: <p>I would like to <strong>not call</strong> a target in build.xml in the case that there is a certain environment variable.  </p>
  
  <p>Using Ant 1.7.0, the following code does not work:  </p>
  
  <pre><code>&lt;property environment="env"/&gt;
  &lt;property name="app.mode" value="${env.APP_MODE}"/&gt;
  
  &lt;target name="someTarget" unless="${app.mode}"&gt;    
     ...
  &lt;/target&gt;
  
  &lt;target name="all" description="Creates app"&gt;
     &lt;antcall target="someTarget" /&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Target "someTarget" executes whether there is the environment variable <code>APP_MODE</code> or not.  </p>