ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour <mansou...@yahoo.com>
Subject Re: command line arguments
Date Sat, 09 Feb 2008 20:58:56 GMT
I am looking for something like this, but without modifying the source code.
I am wondering if it can be done through the build.xml file only.


Dominique Devienne wrote:
> On Feb 8, 2008 3:53 PM, Mansour <mansour77@yahoo.com> wrote:
>   
>> Is there a way to pass command line arguments to ant build file without
>> using the jvm paramets (ie. without -Dsome.option=some.value).
>>
>> I need something like:
>> ant target option.
>>
>> Thank you.
>>     
>
> I hacked something like this using the well known Unix pattern of
> having anything following -- to be stuffed into Ant properties called
> 0, 1 2 3 and #, that you access as ${0}, ... Of course ${#} was the
> number of arguments, and I also had a ${*} containing all the
> arguments except ${0} (to use Ant as a launcher, ${0} being the
> program, and ${*} its arguments). I think it's just changes in
> Main.java, I could share it, although based on an old Main.java. --DD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>   


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


Mime
View raw message