ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Using ant to launch Sqlplus scripts
Date Thu, 19 Oct 2000 11:08:00 GMT
>>>>> "JA" == Johan Adelöw <johan.adelow@corustechnologies.com> writes:

 JA> Am I using the exec task in a bad way?

Yes, it's a simple misunderstanding. executable is really just the
name of the executable, all other arguments need to go int <arg>s.

 JA> <exec executable="sqlplus ${db_user}/${db_passwd}@${database_sid}" 
 JA>       dir="./" output="${logfile}" failOnError="true">
 JA>   <arg value="@${execfile}"/> 
 JA> </exec>

would become

<exec executable="sqlplus" 
      dir="./" output="${logfile}" failOnError="true">
  <arg value="${db_user}/${db_passwd}@${database_sid}" />
  <arg value="@${execfile}"/> 
</exec>

 JA> <exec executable=" echo ${exec_file}: >> ${logfile}" dir="${exec_dir}./"
output="${os_log}" failOnError="true"/>

would become

<exec executable="echo" dir="${exec_dir}./" output="${os_log}" 
        failOnError="true"/>>
   <arg line="${exec_file}: >> ${logfile}" />
</exec>

and so on.

Furthermore, to get the >> interpreted, you need to invoke sh (it's sh
redirecting the output, not echo), probably

<exec executable="sh" dir="${exec_dir}./" output="${os_log}" 
        failOnError="true"/>>
   <arg value="-c" />
   <arg value="&quot;echo ${exec_file}: &gt;&gt; ${logfile}&quot;" />
</exec>

The &quot; and &gt; have been inserted by me, not my mailer 8-).

Stefan

Mime
View raw message