ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <>
Subject Re: Exec task in Ant 1.6.1
Date Wed, 14 Apr 2004 16:08:00 GMT
The attempts I've made were unsuccessful; nothing at all was written to the
output file.

Do you have an example of running a .bat file from Ant? It doesn't need to
do DB2 stuff; a couple of 'dir' commands would do fine....


----- Original Message ----- 
From: <>
To: "Ant Users List" <>
Sent: Wednesday, April 14, 2004 9:48 AM
Subject: Re: Exec task in Ant 1.6.1

> Hi Rhino,
> Have you tried putting all your tasks in a script file (.bat on Win32) and
> execute that script file from Ant?
> Regards,
> Nick G.
> "Rhino" <>
> 04/14/2004 09:36 AM
> Please respond to "Ant Users List"
>         To:     "ant-user" <>
>         cc:
>         Subject:        Exec task in Ant 1.6.1
> Is it possible for an Exec task in Ant 1.6.1 to execute two or more
> commands in the same task?
> I am trying to take something that I do at the Windows XP command prompt
> and do it within an Ant script. Specifically, I do this:
> - launch a Windows XP command prompt via Start/All
> Programs/Accessories/Command Prompt
> - enter the following at the command prompt: db2cmd [This initializes the
> DB2 command line environment, making the next commands possible; they
> don't work at a normal command prompt.]
> - enter the following at the DB2 command prompt: db2 connect to sample
> - enter the following at the DB2 command prompt: db2 comment on specific
> procedure income_proc is 'xyz'
> I've tried pretty much everything you could imagine to imitate this in Ant
> but it never quite works.
> Unfortunately, although there are some DB2 commands that don't need a
> database connection before they will work, most DB2 commands *do* need a
> database connection, including the commands that I need to run. I think I
> need to get the connection and execute the command within the same task,
> although I could be wrong about that; perhaps I could get away with
> getting the connection in one task and then keep it open throughout the
> next task, which could contain the next command.
> Am I trying to do the impossible or have I just used the wrong technique?
> I'd really appreciate any suggestions that would help me get this working.
> Rhino
> ---
> rhino1 AT sympatico DOT ca
> "If you're getting something for nothing, you're not using your own credit
> card."
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message