title: Ant: set property in 1 file, read it in another?
body: <p>I have the following Ant buildfile <code>importer.xml</code>:</p>
  
  <pre><code>&lt;project name="importer" basedir=".." default="build"&gt;
      &lt;import file="imported.xml"/&gt;
  
      &lt;target name="build"&gt;
          &lt;!-- Do some stuff... --&gt;
  
          &lt;property name="isRunningFromImporter" value="true"/&gt;
          &lt;antcall target="run-now"/&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And another buildfile <code>imported.xml</code> that uses the ant-contrib tasks:</p>
  
  <pre><code>&lt;project name="importer" basedir=".." default="build"&gt;
      &lt;!-- Most of file omitted for brevity --&gt;
  
      &lt;target name="run-now"&gt;
          &lt;if&gt;
              &lt;not-equals arg1="${isRunningFromImporter}" arg2="true"/&gt;
              &lt;then&gt;
                  &lt;!--
                      This should only execute when the
                      isRunningFromImporter property is not true.
                  --&gt;
              &lt;/then&gt;
          &lt;/if&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The <code>imported#run-now</code> target can be ran as a standalone Ant task, for example:</p>
  
  <blockquote>
    <p>ant -buildfile imported.xml run-now</p>
  </blockquote>
  
  <p>In this case I do not want the <code>&lt;then&gt;</code> clause/task executed. However, if you run the same task as it is imported into <code>importer.xml</code>:</p>
  
  <blockquote>
    <p>ant -buildfile importer.xml build</p>
  </blockquote>
  
  <p>Then I want the <code>&lt;then&gt;</code> clause/task to execute, however, Ant does no allow me to see a property in one file and read it in another. Any ideas? Thanks in advance!</p>