You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Me...@Bertelsmann.de on 2002/12/09 09:52:18 UTC

How to get command line attributes with Ant

Hi,
how can I read additional parameters that have been added on
comand line level within an ANT task?

How can I get the taskname that has been called 
initially without taking care on dependencies of the 
tasks?


Thanks in advance
Meinolf Schulte-Döinghaus



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to get command line attributes with Ant

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Meinolf.Schulte-Doeinghaus@Bertelsmann.de wrote:
> Hi,
> how can I read additional parameters that have been added on
> comand line level within an ANT task?

You can't. Those parameter's are Ant's parameters, not the task's. Ant will 
interpret them as targets. If you use the -Dproperty=value syntax on the 
command line, then Ant will make these properties available to your task. 
You can ask the Project object for the property's value.

> 
> How can I get the taskname that has been called 
> initially without taking care on dependencies of the 
> tasks?
> 

You may be able to do this, I can't remember off hand, but you should ask 
yourself why you need to know this? The dependencies should express 
everything your build needs to know to build your project.

Conor



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>