You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Clements <dc...@merc-int.com> on 2003/02/05 00:07:18 UTC
Can you get name of target to be run?
Can you get the name of the target that is going to be run upon entry into the build file? I want to set a
property based on what target is going to be run.
Dave
Re: Can you get name of target to be run?
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
No. And this has been a hotly debated topic, in fact.
Keep in mind that Ant can be run this way also:
ant target1 target2 target3
That probably doesn't factor into why its a debatable topic, but does
add some food for thought on it.
You could do something like this though:
ant -Dtarget=target1
And in the default target do an <antcall> to ${target}
Erik
On Tuesday, February 4, 2003, at 06:07 PM, David Clements wrote:
> Can you get the name of the target that is going to be run upon entry
> into the build file? I want to set a
> property based on what target is going to be run.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-user-help@jakarta.apache.org
>
>