ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "venkatesh Sira" <vs...@hotmail.com>
Subject Re: Build failed is wrong
Date Fri, 03 Oct 2003 16:04:04 GMT
Hi Antonie,
I do have failonerror="true", but still failonerror not happeing.
My script looks like this
<target name="wsad" depends="webjunit">
<exec
executable="c:\progra~1\ibm\websph~1\wstools\eclipse\plugins\com.ibm.etools.
j2ee.ant_5.0.1\RunAnt.bat"  failonerror="true">
<arg line="-buildfile c:\prep\ibm.xml" />
</exec>
</target>
<!-- Deploy App to Web -->
<target name="install" depends="wsad">
<record name="log.txt" action="start"/>
<exec executable="c:\progra~1\websphere\appserver\bin\wsadmin.bat"
os="Windows 2000" failonerror="true">
<arg line="-conntype SOAP -host 650wbs -port 8889 -f c:\prep\install.jacl"
/>
</exec>
</target>
Even if task wsad fails it is starting install task
Reg
-Venkat

----- Original Message -----
From: "Antoine Lévy-Lambert" <antoine@antbuild.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, October 03, 2003 9:38 AM
Subject: AW: Build failed is wrong


> Hi Venkat,
>
> add failonerror="true" on your invocation of the command (<exec/>).
> If a dependent target fails, then your build will be stopped
automatically.
> If you want to run a target which is dependent upon other targets, then
you
> might want to create a new target which does not have dependencies and
> invoke just this one.
>
> one way of doing this is :
>
> <target name="aaa" depends="bbb">
>     <antcall target="ccc"/>
>
> </target>
>
> <!-- this target can be invoked directly, does not have dependencies -->
> <target name="ccc">
> <!-- here some actions --->
> </target>
>
> <target name="bbb">
> <!-- here some other actions --->
> </target>
>
> Cheers,
>
> Antoine
>
> -----Urspr√ľngliche Nachricht-----
> Von: venkatesh Sira [mailto:vsira@hotmail.com]
> Gesendet: Donnerstag, 2. Oktober 2003 23:13
> An: Ant Users List
> Betreff: Build failed is wrong
>
>
> All,
> 1) I am running script using executable command inside ant build file, Ant
> always says build successfull, even if the script run & not done its task.
> How can i return the error out of script back to ant, so that
> If script does its job return sucessful else unsuccessful.
>
> 2) Other thing how can run task only if dependent target is successful.
>
> 3) How can run the only the target even though it is dependent on other
> targets.
>
> Reg
> -Venkat
>
>
>
> ---------------------------------------------------------------------
> 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