ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: ant tutorial
Date Thu, 17 Apr 2003 00:59:16 GMT
On Thu, 17 Apr 2003 02:43 am, Gus Heck wrote:
> I agree. This is really cool. The section labeled "Top Level Tasks"
> seems to say that tasks on the top level are run at parse-time. Does
> this mean that the order of tasks at the top level is the order of
> execution, or do the old toplevel tasks still run first?

In 1.6 all top-level tasks are gathered, in build-file order, into an 
invisible target which is executed at the end of parsing (so technically, not 
at parse-time). There is no distinction between old top-level tasks and other 

So, given this build,
<project name="toplevel" default="main">
  <echo message="Task 1 test.prop=${test.prop}"/>

  <target name="main">
    <echo message="Task 2 test.prop=${test.prop}"/>

  <property name="test.prop" value="fubar"/>

  <echo message="Task 3 test.prop=${test.prop}"/>


the output is

Buildfile: build.xml
     [echo] Task 1 test.prop=${test.prop}
     [echo] Task 3 test.prop=fubar

     [echo] Task 2 test.prop=fubar


So, still somethings to be careful about :-)


View raw message