ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <>
Subject Re: Abort build with successful status
Date Mon, 15 Jun 2009 18:43:25 GMT
Can you be more specific what you want to do?

In what circumstance do you want to suddenly stop  your build process, but
consider it a success?

Let's say you want to do "A", "B", and "C" as three tasks in a build, can't
you simply make them targets with dependencies: "C" depends upon "B" and "B"
depends upon "A". If I don't want to run "C", I can merely say run target

Let's say that I want to do "A", "B", and "C", but "C" is mainly a testing
task, and if the server isn't available for testing, I just want to forget
about it. In that case, I can make "C" dependent upon "C-prime" and only run
"C" if "C-prime" is successful. In that case, I have "C-prime" set a
property, and if the property isn't set, I don't execute "C":

<target name="C"

On Mon, Jun 15, 2009 at 1:18 AM, Shawn Castrianni <> wrote:

> Is there a way to end a build prematurely, successfully?  I can use <fail>,
> but then the return value of ant is a failure and it prints out BUILD
> FAILED, which will make the user think something bad happened.  That was not
> the case.  I want to stop a build in certain circumstances and have it be
> normal and successful.  How could I write my own task to do this?
> ---
> Shawn Castrianni
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited.
>  If you are not the intended recipient (or authorized to receive information
> for the intended recipient), please contact the sender by reply e-mail and
> delete all copies of this message.

David Weintraub

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message