ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Blaukopf <daniel.blauk...@sun.com>
Subject Re: Failures in exec command
Date Mon, 24 Nov 2003 16:19:06 GMT
You can pass each argument separately:

<arg value="-nogui"/>
<arg value="-onerror"/>
<arg value="EXIT"/>
<arg value="-c"/>
<arg 
value="uid=${athena.db.uid};pwd=${athena.db.pwd};eng=${athena.db.eng};dbn=${athena.db.name};startLine=dbsrv8"/>

and so forth

Daniel

Erez Nahir wrote:

>Thanks Daniel,
>
>I'll try the verbose mode but if that is the problem, how could I run
>the command without the [line] param?
>
>Thanks,
>Erez.
>
>  
>
>>-----Original Message-----
>>From: Daniel Blaukopf [mailto:daniel.blaukopf@sun.com] 
>>Sent: Monday, November 24, 2003 4:36 PM
>>To: Ant Users List
>>Cc: 'yardena Meymann'; Gadi Berman
>>Subject: Re: Failures in exec command
>>
>>
>>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."
>>
>>Dnaiel
>>
>>Erez Nahir wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>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?).
>>>
>>>Thanks,
>>>Erez.
>>>
>>>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 ${athena.db.name}.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 
>>>&quot;uid=${athena.db.uid};pwd=${athena.db.pwd};eng=${athena.
>>>      
>>>
>>db.eng};db
>>    
>>
>>>n
>>>=${athena.db.name};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} 
>>>      
>>>
>>${athena.db.name}.db -n
>>    
>>
>>>${athena.db.name}&quot; script.sql"/>
>>> </exec> 
>>></target>
>>>
>>>Output:
>>>=====
>>>make-db:
>>>[echo] ****************************************
>>>[echo] BUILDING DATABASE
>>>[echo] ****************************************
>>>[echo] Going to run dbinit
>>>[exec] Adaptive Server Anywhere Initialization Utility Version 
>>>8.0.2.3601 [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
>>>
>>>fill-db:
>>>[echo] Going to run dbisql
>>>[exec] Connection failed. Specified database is invalid
>>>
>>>[exec] You are not connected to a database.
>>>
>>> 
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message