ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spencer Phil (KTXA 2)" <phil.spen...@credit-suisse.com>
Subject RE: <succeed/> ?
Date Fri, 03 Oct 2003 09:54:07 GMT
I disagree.

Of course <succeed/> is essentially a goto and you can always
rewrite programs to avoid gotos if you have conditional logic
constructs. But I would make two observations here

1. Conditional logic in ANT is very ugly and unreadable

2. <fail/> is also a goto! If I accept that I don't need
   <succeed/> I must also argue that you don't need <fail/>

My build is a huge, dynamically discovered, recusive tree
walk. At certain points in the tree I may discover conditions
that mean I can't progress further. These conditions may be
true error conditions (<fail/>) or conditions that mean I should
just stop or display an advisory message and stop <succeed/>.

Another use for <succeed/> would be to change the success message
at the end of a succesful build. The BUILD SUCCESSFUL message
can be very worrying to a user if they are just expecting a
couple of files to be copied for example.

I'm fed up with

	<echo>
	*** PLEASE IGNORE THE "BUILD FAILED" MESSAGE BELOW ***
	...
	</echo>
	<fail/>

Phil

-----Original Message-----
From: Emmanuel Feller [mailto:Emmanuel.Feller@free.fr]
Sent: October 03, 2003 10:59
To: Ant Users List
Subject: Re: <succeed/> ?


Hi,
You should not need a succed because ant is a description of
your build process.

So if you need a succed, it should be a problem in your
build file.

You should think that some action are in your process but
sometime you do not have to execute them. So you are back to
the Ant logic and may use conditionnal target.

I hope it helps, if not post more details about your build
and we could be more helpfull ;)
Emmanuel

----- Message d'origine ----- 
De : "Spencer Phil (KTXA 2)"
<phil.spencer@credit-suisse.com>
À : "'Ant Users List'" <user@ant.apache.org>
Envoyé : vendredi 3 octobre 2003 10:41
Objet : <succeed/> ?


> Is there an way explicitly to stop an Ant build with a
BUILD SUCCESSFUL message?
>
> The "<fail/>" task reports BUILD FAILED
>
> I'm loking for something like "<succeed/>"
>
> Phil
>
> ----------------------------------------------------------
-----------
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message