ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <>
Subject Re: Urgent Help Required:<Exec> Issue with Suse Linux
Date Sat, 21 May 2005 16:50:48 GMT
If it works on a command line, write a batch script and execute it as 
"cmd /c batch.bat".

- Alexey.

Kapil Bajaj wrote:

>Hi All
>I am facing an issue when I am trying to execute Ant Script in Suse
>Environment. I am using Ant Version 1.6.1. I am using exec Tag in 
>Build.xml to make connection to DB2 Database and then using Exec Tag
>to execute a SQL File
><exec executable="db2" output="db2-nagano.txt" append="true">
>           <arg line="-v CONNECT TO dummy USER db2admin USING db2pass"
><exec executable="db2" output="db2-nagano.txt" append="true">
>           <arg line="-f getNaganoInfo.sql" />
>In this case I would like that both Exec Commands should execute in same
>Shell Environment so that Connection made by First Tag can be used by
>However I guess Ant is executing both the Command in different shell 
>environment and therefore connection made is not passed to next command 
>while executing sql file. Hence I am getting Error for "No Connection
>to database".
>This Script seems to be working perfectly fine in Windows Environment. 
>Also If I manually type my Command on prompt at Linux shell then also I 
>get correct result. Only when I try to do this task using Ant Script I
>getting this Error which suggest that exec Command is not executing in 
>same shell in Linux. Can some one please suggest me workaround for this 
>issue as this has become a High Prioroty Issue.
>Thanks and Regards
>Kapil Bajaj
>India Software Labs
>IBM Software Group.
>Email :

/ Alexey N. Solofnenko

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

View raw message