ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shailesh Sharma <shailesh_s...@yahoo.com>
Subject RE: passing parameters from command line to the ant script ????
Date Mon, 29 Sep 2003 16:27:08 GMT
i agree, sorry for being having bad etiquette ....:) sometimes !!!
 
well, the problem is that if i specify all the parameters with -D property then i would basically
loose the whole point of specifying something like this:
 
my-unix-box > ./ant monapp testnet
my-unix-box > ./ant monapp production
 
the point is ....iam trying to use ANT and i wanted to hide all complexities there in. These
scripts will be used by people who will not anything about ANT/shell.
 
do you understand what iam saying ?
 
my another question was:
how can i make 2 targets to be different with the *same name* but with 2 different "depends"
??
is it possible .....OR else my question is .....is it in any ways possible to make 2 targets
to be different having a same name ???
 
 
 
thx, shailesh
 
 


David McTavish <dmctavish@sandvine.com> wrote:
Hi Shailesh,
Can you please refrain from using all capitals in your Subject? It really is
considered bad etiquette.

As for your answer, you can supply parameters on the command-line using the
-D parameter:

ant -Dmyproperty=x mytarget


HTH,
d.


-----Original Message-----
From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
Sent: Monday, September 29, 2003 12:08 PM
To: Ant Users List
Subject: PASSING PARAMETER FROM COMMAND LINE TO THE ANT SCRIPT ????


Hi,
how can i pass a parameter from my unix command line to my ANT script ?

Here is what i wanted to do:

when i type something like this:
my-unix-box > ./ant monapp testnet

then it should invoke my shell script called testnet.sh from an ANT build
script.

Now when i type in something like this:
my-unix-box > ./ant monapp production
then it should invoke my shell script called production.sh from an ANT build
script.

how can i do this:

I have created a build.xml file, ant.properties file and all other shell
scripts.
Iam basically "exec"uting my shell scripts from my ANT scripts.

Please help !!
thanks in advance ...shailesh


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

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


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message