jGuru Forums

How to get environment variables defined by a shell script or batch file called by build.xml?
0 posts in topic
Flat View
TOPIC ACTIONS:

Posted On:   Monday, July 15, 2002 04:42 PM

Erik: I have a file which is already picking up all the variable definitions from the Environment plus some other properties defined in a common.properties file. Everything is OK. Now we would like to grab inside Ant additional environment variables that will be defined, depending on certain conditions, by running a shell script or batch file (the must work both in UNIX and Windows ). How can I, inside an Ant target, run a shell script or batch file and get as Ant properties the new Environment variables defined inside the shell script or batch file?. I can run the script only after Ant has been called because chooses    More>>

Erik:

I have a file which is already picking up all the variable
definitions from the Environment plus some other properties defined in a common.properties
file. Everything is OK.

Now we would like to grab inside Ant additional environment variables that will
be defined, depending on certain conditions, by running a shell script or batch file (the
must work both in UNIX and Windows ).

How can I, inside an Ant target, run a shell script or batch file and get as
Ant properties the new Environment variables defined inside the shell script or
batch file?. I can run the script only after Ant has been called because chooses a corresponding script file name depending on certain conditions.

Thanks,

Jorge