You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2003/04/07 17:54:56 UTC

Re: "destroy"-ing an Ant exec doesn't destroy what Ant is "exec"- ing...

On Mon, 7 Apr 2003, Dominique Devienne <DD...@lgc.com> wrote:

> Why can't Main.java be modified to not call System.exit, possibly
> conditionally under the control from a new command line argument?

Reread Rich's mail.  Ant calling System.exit is not his problem (well,
at leat not all of it), he's looking for a more general solution.

Main#main has never been intended to be anything but the command line
entry point into Ant.  Calling System.exit with any argument other
than 0 on errors is highly appreciated by us Unix users.  This rules
out removing the System.exit unconditionally.

I'd rather add a new method for non-command line usage that didn't
include a System.exit than making this conditional.  But then again,
we don't really have a nice API for embeddors and we shouldn't even
try to claim we had one (which a separate entry point for embeddors
micht do).

I'd rather like to see us providing a real API for these things, and
thought the Antidote project would push Ant into that direction.  It
didn't and efforts have slowed down.

Stefan

Re: "destroy"-ing an Ant exec doesn't destroy what Ant is "exec"- ing...

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>
To: <us...@ant.apache.org>
Sent: Monday, April 07, 2003 08:54
Subject: Re: "destroy"-ing an Ant exec doesn't destroy what Ant is "exec"-
ing...


> On Mon, 7 Apr 2003, Dominique Devienne <DD...@lgc.com> wrote:
>
> > Why can't Main.java be modified to not call System.exit, possibly
> > conditionally under the control from a new command line argument?
>
> Reread Rich's mail.  Ant calling System.exit is not his problem (well,
> at leat not all of it), he's looking for a more general solution.
>
> Main#main has never been intended to be anything but the command line
> entry point into Ant.  Calling System.exit with any argument other
> than 0 on errors is highly appreciated by us Unix users.  This rules
> out removing the System.exit unconditionally.

main calls void start(String args[]), right? maybe it shoud delegate to

void start(String args[]) {
  int result=runAnt(args);
 System.exit(result);
}

and then runAnt or whatever would be the other entry point.