ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <>
Subject Exec task in Ant 1.6.1
Date Wed, 14 Apr 2004 13:36:31 GMT
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

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.

rhino1 AT sympatico DOT ca
"If you're getting something for nothing, you're not using your own credit card."
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message