ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Mark Bram" <>
Subject Re: passing parameters from Ant to Unix Shell script
Date Mon, 27 Sep 2004 04:40:09 GMT
Hi Animesh!

> I am trying to pass parameters from Ant to Unix shell scripts that
> will maintain all environment variables across environments. Can you
> pls. pass on a sample build.xml file and a sample shell script which
> can accept parameters from the build file. I am familiar with command
> line argument passing for Shell scripts but do not know well enough
> about Ant scripts. Any help will be much appreciated.

I asked the same question recently!

<exec executable="bash scripts which can use myVar">
   <env key="myVar" value="someValue"/>

-- from Stefan Bodewig


1. you can use nested <env>s when invoking with <exec>
2. you can create the script from a template and insert the "export"  

-- from JanMaterne


Robert Mark Bram
B.Comp.(Systems Development/Business Systems)
Doctor of Philosophy Student

School of Network Computing
Faculty of Information Technology
Monash University
Peninsula Campus
McMahons Rd
Frankston, VIC 3199

Phone:  61 3 9904 4394
Facsimile:  61 3 9904 4124

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

View raw message