ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: 'nother question (was: Re: Quick question wrt JAVA_HOME)
Date Tue, 09 Jan 2001 07:57:06 GMT
Diane Holt <holtdl@yahoo.com> wrote:

> Here's another question... From the "Writing a Simple Buildfile"
> section: Each element of the buildfile can have an id attribute and
> can later be referred to by the value supplied to this. The value
> has to be unique.  What is this referring to?

<task id="sometask" />

The id attribute has the value sometask. You can refer to the
corresponding task object in scripts or other tasks via this name. In
scripts you could do

<script ...>
  sometask.setFoo("bar");
</script>

to set the foo attribute of this particular task instance. In another
task (written in Java) you can access the instance via
project.getReference("sometask").

Stefan

Mime
View raw message