Yes, I meant from inside the buildfile. Sorry - actually I mean to say
"target", not "task". I'd like to be able to do something like this:

<target name="foo">
    <some-task/>
    <another-task/>

    <condition property="should.exit">
        (condition check here....)
    </condition>

    <exit if="should.exit" message="some message"/>

    (do more-tasks...)

</target>

The "exit" task would simply exit the target, but would not abort the entire
build (assuming "foo" is a child target). Is THIS possible?

- mps

--- [EMAIL PROTECTED] wrote:
> sure, while coding the task you can simply exit the execute() method without
> throwing a BuildException.
> 
> mmh or do you mean from inside the buildfile?
> It cant - a task is an atomic instruction. You couldnt stop a
> System.out.println("test") while 
> execution.
> 
> 
> Jan
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Michael Pelz Sherman [mailto:[EMAIL PROTECTED]
> > Gesendet am: Donnerstag, 17. März 2005 00:50
> > An: Ant Users List
> > Betreff: Exiting ant task without aborting build
> > 
> > Is there a way to exit an ant task without aborting the 
> > entire build (i.e.
> > using the <fail> task)?
> > 
> > Thanks,
> > - mps
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to