ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: How to get command line attributes with Ant
Date Mon, 09 Dec 2002 09:10:03 GMT 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.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message