ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pugh, Eric" <>
Subject RE: Passing in parameters
Date Tue, 18 Sep 2001 13:30:25 GMT
In response to the two earlier replys....:

1) I am trying to pass an enviroment variable into ANT.  I want to copy a
series of images and files to a webserver, and want to pass the name of the
webserver into ANT.  What I have done is just tack on a ton of methods, so
instead of:
	ant deployAllImages webserver1

I have multiple methods
	ant deployAlllImages-webserver1
	ant deployAlllImages-webserver2
	ant deployAlllImages-webserver3

2) The reasons I don't want to use the -D method is because I want to turn
over the build/deploy scripts to a less technical, non java developer.  And
requireing things like -D I think is going to be weird.  I guess I could
have ant deployAllImages -Dserver=webserver1, but that is a long command
line to remember.  And with multiple parameters, say deploy -Dtype=images
-Dserver=webserver1 seems clumsier.  I don't want to create wrappers because
that is more to maintain, but maybe it is worth it.  


-----Original Message-----
From: Erik Hatcher []
Sent: Monday, September 17, 2001 8:16 PM
Subject: Re: Passing in parameters

What's wrong with -D?

And how do you propose for Ant to support multiple targets on the
command-line if targets and parameters are specified the same way?

How about writing your own wrapper script that does the "-D" under the hood
and only allows a single target to be specified?


----- Original Message -----
From: "Pugh, Eric" <>
To: <>
Sent: Monday, September 17, 2001 3:17 PM
Subject: Passing in parameters

> Is it possible to pass in parameters to ant?  Or is that completely
> the philosphy?
> I want to be able to pass in an enviroment parameter that does require the
> use of -Denviroment=stage.  Instead I want to be able to do:
> ant myproject stage
> or
> ant myproject live
> and so forth....
> I didn't seem to find anything directly related in the mail archives....
> ERic Pguh

View raw message