title: When are Ant path references set?
body: <p>When I use a path reference ID, Ant seems to evaluate any variables inside the definition before any tasks run.  For example, <code>${common.dist}</code> and <code>${common.lib}</code> below seem to be  evaluated before any tasks run.</p>
  
  <pre><code>&lt;path id="compile.classpath"&gt;
        &lt;fileset dir="lib"&gt;
           &lt;include name="*.jar" /&gt;
        &lt;/fileset&gt;
        &lt;fileset dir="${common.dist}"&gt;
           &lt;include name="*.jar" /&gt;
        &lt;/fileset&gt;
        &lt;fileset dir="${common.lib}"&gt;
           &lt;include name="*.jar" /&gt;
        &lt;/fileset&gt;
  &lt;/path&gt;
  </code></pre>
  
  <p>In the Ant output I see something like this:</p>
  
  <pre><code>Adding reference: compile.classpath
  Property "common.dist" has not been set
  Property "common.lib" has not been set
  ...
  Build sequence for target(s) `package' is [...]
  Complete build sequence is [...]
  </code></pre>
  
  <p>This makes it seem like the path reference is being processed before any targets are run.</p>
  
  <p>I have a compile target like this:</p>
  
  <pre><code>  &lt;target name="compile" depends="init,common"&gt;
      &lt;javac destdir="build/classes" debug="true" deprecation="true" optimize="true"&gt;
        &lt;src path="src/java" /&gt;
        &lt;classpath&gt;
          &lt;path refid="compile.classpath" /&gt;
        &lt;/classpath&gt;
      &lt;/javac&gt;
    &lt;/target&gt;
  </code></pre>
  
  <p>If I copy the guts of the path reference into the classpath element inside the compile target, things seem to work fine.</p>