ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Panayotis Katsaloulis <panayo...@panayotis.com>
Subject Re: How to get the stack of targets, from inside a task?
Date Thu, 24 Feb 2011 13:52:54 GMT

On 24 Φεβ 2011, at 3:47 μ.μ., Scot P. Floess wrote:

> 
> I've done something like this - but with XSLT...
> 
> I'm guessing you aren't interested in this to simply display the information?
> 

Well, since (due to dependencies) the same target can be called from different other targets,

I am more interested on the actual stack of targets, which I believe could not be found with
XSLT...


> On Thu, 24 Feb 2011, Panayotis Katsaloulis wrote:
> 
>> Hello people!
>> 
>> I am trying to develop a custom ant task, which ideally would like to get hold of
the stack of all parent targets.
>> For example in this  configuration:
>> 
>> <target name="one" depends="two,three"/>
>> 
>> <target name="two"/>
>> 
>> <target name="three" depends="four"/>
>> 
>> <target name="four">
>> 	<customtask />
>> </target>
>> 
>> 
>> if the command "ant one" was executed from the command line, I'd like to get a list
like this (in the task customtask):
>> one, three, four
>> 
>> In the documentation I found only the method getOwningTarget() which would only return
the current target, "four".
>> 
>> Is there any way to do this?

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


Mime
View raw message