ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prabhakar, V" <V.Prabha...@compaq.com>
Subject RE: Control Flow with ANT
Date Fri, 01 Mar 2002 15:35:18 GMT
Thanks for all pointers. I am looking for generic way of achieving flow
control using exisiting ANT tasks. As I mentioned in my original email,
the execution of a task may depend on the execution of another task.
Current 'depend' attribute on a target, provides the dependency. I am
looking for conditional dependency. Say we have three targets A, B and
C. I want the following flow control,

if target A succeeds (how we know if A succeeded or failed)
  execute target B
else 
  execute target C

I was quickly scanning through ANT 2.0 requirements. I agree with the
justification that ANT is declarative language and so it does not
provide or intend to provide flow control in core. (Later, I read
somewhere that ANT 2.0 might provide simple foreach, if, switch, etc) I
inferred from the same requirements doc that the flow control can be
simulated with the exisiting set of ANT tasks. So I am wondering how to
achieve simple flow control like what I have stated above.

Hope I have clarified what I am looking for.

-Prabhakar




-----Original Message-----
From: Marcusz Zafarano [mailto:marcusz@criticalpointsoftware.com]
Sent: Thursday, February 28, 2002 7:38 PM
To: Ant Users List
Subject: RE: Control Flow with ANT


you might also want to look to cruisecontrol.

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Thursday, February 28, 2002 3:41 PM
To: Ant Users List
Subject: Re: Control Flow with ANT


--- "Prabhakar, V" <V.Prabhakar@compaq.com> wrote:
> For instance, I am planning to use ANT to perform a set of tasks:
> compile and deploy. If the compilation fails, I do not want to proceed
> with deployment.

Some tasks, including <javac>, have a (boolean) 'failonerror' attribute
--
set to true, the build will fail if there's an error; set to false, the
build proceeds despite any errors. The default is "true" for <javac>, so
you don't need to set it to get the behaviour you want.

> I want to just notify using email.

See the MailLogger documentation:
http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/manual/listene
rs.h
tml?rev=1.3&content-type=text/plain#MailLogger

Diane

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



__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.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>


--
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