ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilson, Bruce" <bwil...@sonusnet.com>
Subject Why use an init target ?
Date Tue, 23 Oct 2001 23:19:09 GMT

I've seen many example Ant build files that define an <init> target to
define common properties within;
yet I'm finding that properties defined directly in the project (outside of
any target) are also found
by all the tasks in the project.  So what's the advantage of putting
definitions like this in an <init>
target ?

I ask this specifically because right now we're changing our build.xml to
use a <path> tag to define
the CLASSPATH for compiling our Java code, and we've found that the <path>
tag can't be in a <target>
tag - seems it has to be in the <project> tag.  Yet we have a couple of
properties that are used to
define the root directory below which alot of the code on CLASSPATH is
located.

So, why <init> ?  Was this required to get property definitions to work
correctly in earlier versions
of Ant (we're currently using 1.3) ?

Thanks in advance...

Bruce

Mime
View raw message