ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhay Kulkarni" <abh...@pune.tcs.co.in>
Subject Re: Want to exit if any target in dependency list failed
Date Sat, 06 Apr 2002 08:54:38 GMT
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" <holtdl@yahoo.com>
To: "Ant Users List" <ant-user@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 <abhayk@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:   <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