ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Blaukopf <>
Subject Re: Failures in exec command
Date Mon, 24 Nov 2003 14:36:01 GMT
Hi Erez,

First, you could try running with "ant -verbose" to make sure that your 
parameters to the second process are getting quoted correctly.

Also, note the following from the Ant documentation on the <arg> 
parameter to <exec>:

"It is highly recommended to avoid the |line| version when possible. Ant 
will try to split the command line in a way similar to what a (Unix) 
shell would do, but may create something that is very different from 
what you expect under some circumstances."


Erez Nahir wrote:

>In our application we are running two executable commands in order to
>create and fill the database.
>When running the build from command line it works fine but on our build
>machine the build is running as a process and many times the second
>command does not find the db files generated in the first command.
>Here are the targets and the output, any idea what I can do?  (my guess
>is that ant caches the directory content and because of that it fails to
>find the db files on second call, am I right?).
>Ant targets:
> <target name="make-db" description="-->Create ahtenaDB">
>  <echo message="****************************************"/>
>  <echo message="  BUILDING DATABASE"/>
>  <echo message="****************************************"/>
>  <echo message="Going to run dbinit"/>
>  <exec dir="${athena.db}" executable="dbinit.exe" failonerror="true"
>os="Windows 2000">
>   <arg line=" -p 4096 -b -c -j ${}.db"/>
>  </exec>
> </target>
> <target name="fill-db" description="--Generate tables for athant db">
>  <echo message="Going to run dbisql"/>
>  <exec dir="${athena.db}" executable="dbisql.exe" failonerror="true"
>os="Windows 2000">
>   <arg line=" -nogui -onerror EXIT -c
>=${};startLine=dbsrv8 -x
>tcpip{HOST=localhost;DOBROADCAST=NO;ServerPort=7777} -q -ti 0 -gm 100
>-gc 5 -c 16M -ht -gss 9900 -n ${athena.db.eng} ${}.db -n
>${}&quot; script.sql"/>
>  </exec> 
> </target>
>[echo] ****************************************
>[echo] ****************************************
>[echo] Going to run dbinit
>[exec] Adaptive Server Anywhere Initialization Utility Version
>[exec] Creating system tables
>[exec] Collation sequence: 1252LATIN1
>[exec] Creating system views
>[exec] Setting permissions on system tables and views
>[exec] Setting option values
>[exec] Initializing UltraLite deployment option
>[exec] Database "athenaDB.db" created successfully
>[echo] Going to run dbisql
>[exec] Connection failed. Specified database is invalid
>[exec] You are not connected to a database.

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

View raw message