ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aarti Chandnani <Aarti.Chandn...@XUMA.com>
Subject RE: Execute another bat file.
Date Fri, 27 Apr 2001 16:45:29 GMT
If your build is successfu, it means that the classpath was set.
Else the build would fail.
Try a verbose option while you run ant so you will know if it is being
executed.
Besides, you can set the failonerror to true
so the build will exit if exec failed.


-----Original Message-----
From: J2EE User [mailto:coolxml@hotmail.com]
Sent: Friday, April 27, 2001 9:31 AM
To: ant-user@jakarta.apache.org
Subject: Re: Execute another bat file.


Simon:
Even my build was successful. But it does not seem to execute the bat file.

env.bat file attempts to set the classpath, but after ant completes the
excution, the classpath is still not set.
Thanks
J2EE User
----- Original Message -----
From: <SimonRichardson2@halifax.co.uk>
To: <ant-user@jakarta.apache.org>
Sent: Friday, April 27, 2001 11:50 AM
Subject: RE: Execute another bat file.


> I had go with your sample code and the env.bat file I created ran!
>
> The contents of the env.bat:
> @echo off
> echo "hello"
>
> I also wrapped your target with the following project definitions:
>
> <project name="test" default="init" basedir=".">
> <target name="init">
>       <tstamp/>
>       <echo message="Begining execution of the bat file"/>
>       <exec executable="c:\bea\env.bat">
>     </exec>
> </target>
> </project>
>
> I ran if from c:\ but before doing that I set the following environment
> variables:
> C:\>path=c:\jakarta-ant-1.3\bin;%path%
> C:\>set ant_home=c:\jakarta-ant-1.3
> C:\>set java_home=C:\jdk1.3.0_02
>
> And I got the following results:
>
> C:\>ant -buildfile c:\temp\build.xml
> Buildfile: c:\temp\build.xml
>
> init:
>      [echo] Begining execution of the bat file
>      [exec] "hello"
>
> BUILD SUCCESSFUL
>
> Total time: 0 seconds
> C:\>
>
> I hope there's someting here that may help :-).
>
>
>
> Simon
>
> -----Original Message-----
> From: J2EE User [mailto:coolxml@hotmail.com]
> Sent: 27 April 2001 16:37
> To: ant-user@jakarta.apache.org
> Subject: Execute another bat file.
>
>
> Friends:
> I have all my classpath settings and environment variables settings in a
> batch file called env.bat
>
> From build.xml I want to call the env.bat so that I do not have to do the
> class path settings in every build.xml file.
>
> Here is the build.xml file snippet:
>
> <!--Execute the bat file that sets the environment -->
> <target name="init">
>       <tstamp/>
>       <echo message="Begining execution of the bat file"/>
>       <exec executable="c:\bea\env.bat">
>     </exec>
> </target>
>
> When I run ant, it says build successful, but the env.bat is not executed.
> Any ideas?
>
>
> Thanks in advance
>
> --------------------------------------------------------------------------
----
> Part of the Halifax Group, Halifax plc, Registered in England No. 2367076.
Registered Office: Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents
only the Halifax Financial Services Marketing Group for the purposes of
advising on and selling life assurance, pensions and unit trust business.
The Marketing Group is regulated by the Personal Investment Authority.
Switchboard 01422 333333.
>
>
>
============================================================================
==
>
>

Mime
View raw message