ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Adelöw <Johan.Ade...@corustechnologies.com>
Subject RE: Problem with failing exec task
Date Tue, 07 May 2002 06:51:46 GMT
Tanks for answering Diane!
Actually I have done this, not with the condition task because it did not
exist when I wrote this, but with the avaliable task. What does the
'vmlauncher="no"' attribute do I cant recall that I've seen that before (Were
using some early version of ant 1.5).
/Johan


<target name="loadjava_rep" if="INSTALL_REP">
    <available file="${ORACLE_HOME}/bin/loadjava.bat" property="IS_WINDOWS"/>
    <antcall target="loadjava_rep_win"/>
    <antcall target="loadjava_rep_unix"/>
</target>

<target name="loadjava_rep_win" if="IS_WINDOWS">
	<echo message="Loading navutil.jar"/>
	<exec executable="${ORACLE_HOME}/bin/loadjava.bat"
dir="${ORACLE_HOME}" failOnError="true">
	    <env key="ORACLE_HOME" value="${ORACLE_HOME}"/>
	    <arg value="-u"/>
	    <arg
value="${REP_DB_USER}/${REP_DB_PASS}@${REP_DB_HOST}:${REP_ORACLE_LISTENER_POR
T}:${REP_ORACLE_SID}"/>
	    <arg value="-r"/>
	    <arg value="-t"/>
	    <arg value="${NAVAJO_DIR}/lib/navutil.jar"/>
	</exec>
</target>

    <target name="loadjava_rep_unix" unless="IS_WINDOWS">
	<echo message="Loading navutil.jar"/>
	<exec executable="${ORACLE_HOME}/bin/loadjava" dir="${ORACLE_HOME}"
failOnError="true">
	    <env key="ORACLE_HOME" value="${ORACLE_HOME}"/>
	    <arg value="-u"/>
	    <arg
value="${REP_DB_USER}/${REP_DB_PASS}@${REP_DB_HOST}:${REP_ORACLE_LISTENER_POR
T}:${REP_ORACLE_SID}"/>
	    <arg value="-r"/>
	    <arg value="-t"/>
	    <arg value="${NAVAJO_DIR}/lib/navutil.jar"/>
	</exec>
</target>

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: den 6 maj 2002 16:34
To: Ant Users List
Subject: Re: Problem with failing exec task


--- Johan_Adelöw <Johan.Adelow@corustechnologies.com> wrote:
> We have been using ant to build and install our product for quite a
> while using jdk1.2.2 and it has always been working on all operating
> systems. Now when switching to jdk1.3 we have encountered a problem. 
> We use the ant exec task to launch Oracles loadjava functionality and I
> think that thisone consumes quite a bit of memory. When usink java 1.3
> the exec task fails with different messages on different OS.

Doesn't have to do with the amount of memory anything's using. It has to
do with the difference in how the command is being executed by the VM. You
can either include 'vmlauncher="no"' in your <exec> task, or include the
".bat" extension in the command name when you're running on a Win* box.
You can set it in a property that conditionally includes it -- eg:
  <condition property="loadjava" value="loadjava.bat">
    <os family="windows"/>
  </condition>
  <property name="loadjava" value="loadjava"/>
then reference ${loadjava} in the <exec> 'executable' attribute.

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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


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


Mime
View raw message