title: How do I use the condition element in ant to set another property?
body: <p>I have a build.xml to use with ant, and I'm trying to put a condition within a target:</p>
  
  <p>First I set the property here which works OK:</p>
  
  <pre><code>&lt;condition property="isWindows"&gt;
      &lt;os family="windows"/&gt;
  &lt;/condition&gt;
  </code></pre>
  
  <p>Then I try to use it in the target:</p>
  
  <pre><code>&lt;target name="-post-jar"&gt;
      &lt;condition property="isWindows" value="true"&gt;
           &lt;!-- set this property, only if isWindows set --&gt;
           &lt;property name="launch4j.dir" location="launch4j" /&gt;
      &lt;/condition&gt;
  
      &lt;!-- Continue doing things, regardless of property --&gt;
      &lt;move file="${dist.jar.dir}" tofile="myFile"/&gt;
      &lt;!-- etc --&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>I'm getting an error: "condition doesn't support the nested "property" element."
  The questions are : How do I correctly put a condition inside a target and why is the error referring to a 'nested' property?</p>