ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Labouisse" <christo...@labouisse.org>
Subject RE: Using Ant API to retrieve task/target information
Date Tue, 01 Jun 2004 10:33:02 GMT

Jose Alberto Fernandez said:
> Notice that you really cannot rely on the tasks allowing you to peek
> at the information inside them. Remember that in principle ANT is a
> component
> framework and that more and more we spect ANT components to be provided
> by third parties. So you cannot count on having getters for avery
> component.

Yep that's why I fallback on the RuntimeConfigurable wrapper to find out
information for ant, antcall or foreach task. I guess this should be ok as
the RuntimeConfigurable is available regardless of the compoment provider.

> With that in mind, I would suggest taking a look at ProjectHelper and
> the UnknownObject infrastructure. Maybe a version of ProjectHelper can be
> provided that does not resolve things to actual targets and tasks
> but give you UnknownObjects instances that you can peek into.

I thought of writing an alternate ProjectHelper providing more information
but it does not really suits me as I want to be able to graph the current
project. So when the <grand> task will be run, the project will already be
loaded with a ProjectHelp I've no control on.

Anyway I'll guess I should live with getter at the target level and using
the wrapper to introspect tasks.


-- 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message