Discussion:
How to get command line attributes with Ant
M***@Bertelsmann.de
2002-12-09 08:52:18 UTC
Permalink
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
Conor MacNeill
2002-12-09 09:10:03 UTC
Permalink
Post by M***@Bertelsmann.de
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.
Post by M***@Bertelsmann.de
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

Continue reading on narkive:
Loading...