You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Diane Holt <ho...@yahoo.com> on 2001/01/09 08:05:53 UTC

'nother question (was: Re: Quick question wrt JAVA_HOME)

--- Peter Donald <do...@apache.org> wrote:
> JAVA_HOME is required for some of the other jdk tools too I believe.

Okay -- I'll point them to the "Advanced" section below that explains it a
bit more.

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?

Thanks,
Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

Re: 'nother question (was: Re: Quick question wrt JAVA_HOME)

Posted by Stefan Bodewig <bo...@apache.org>.
Diane Holt <ho...@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