ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: 'nother question (was: Re: Quick question wrt JAVA_HOME)
Date Tue, 09 Jan 2001 08:22:48 GMT
Diane Holt <> wrote:

> Stefan Bodewig <> wrote:
>> <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").
> Really? I had no idea you could do that. You can do that for any
> task?


> it's not an aspect of the individual tasks themselves, but rather
> something taken care of in

Even worse 8-). The id attribute is magic and handled in

> I'll scoop up what you've written here and stick it in the doc.

But take it with a grain of salt. If "sometask" has not been run yet,
it has not been configured (no attribute has been set) and if it is
going to be configured later, anything you've done to the instance may
be overwritten.

And finally, most anything I've described is going to be broken by
Ant2 when there are no task instances at all, but only proxies.


View raw message