You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Abhay Kulkarni <ab...@pune.tcs.co.in> on 2002/04/05 12:28:37 UTC
Want to exit if any target in dependency list failed
hi!!!!
acutally i'm converting make file to ANT
make file is like this
modelBasedGeneration : queryTempGenerated compMakeGenerated JavaclassesGenerated svrDrvGenerated
i want to exit if any of the targets in dependency list is failed
so can any one please tell me how can i do that
Regards,
Abhay.
Re: Want to exit if any target in dependency list failed
Posted by Abhay Kulkarni <ab...@pune.tcs.co.in>.
hi!!!!
1]i have make file like this
modelBasedGeneration : queryTempGenerated compMakeGenerated
JavaclassesGenerated svrDrvGenerated
action1
queryTempGenerated :anotherdependent
action2
action3
action4
compMakeGenerated :.......................
......
......
so i want to exit if in target queryTempGenerated any of actions
action2,action3,action3 is failed
so if action3 is failed action4 should not get executed
so how should i do it in ANT
or ANT does it explicitly
2] and can i check whether a task is completed successfully
suppose my task is
<target name=target1">
<exec dir="${src}" executable="cmd.exe">
<arg line="/c perl ${PERLDIR}\compileStdJavaFiles1.pl"/>
</exec>
</target>
can i check the return status of the command i executed such as perl command
is used here
or how can i check the return status of the last executed command
is there any facility given by ANT
Regards,
Abhay.
From: "Diane Holt" <ho...@yahoo.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Saturday, April 06, 2002 4:06 AM
Subject: Re: Want to exit if any target in dependency list failed
> --- Abhay Kulkarni <ab...@pune.tcs.co.in> wrote:
> > i want to exit if any of the targets in dependency list is failed
> > so can any one please tell me how can i do that
>
> If you have a target that depends on other targets and a task in any of
> the dependencies hits an error, the build will exit with BUILD_FAILED --
> unless the task that got the error has a 'failonerror' attribute, and it's
> been set to "no" -- so you shouldn't have to do anything special to have
> it do what you asking for.
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Want to exit if any target in dependency list failed
Posted by Diane Holt <ho...@yahoo.com>.
--- Abhay Kulkarni <ab...@pune.tcs.co.in> wrote:
> i want to exit if any of the targets in dependency list is failed
> so can any one please tell me how can i do that
If you have a target that depends on other targets and a task in any of
the dependencies hits an error, the build will exit with BUILD_FAILED --
unless the task that got the error has a 'failonerror' attribute, and it's
been set to "no" -- so you shouldn't have to do anything special to have
it do what you asking for.
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>