You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marc Logemann <de...@logemann.info> on 2002/06/11 17:21:50 UTC

parsing a task output for further processing

Hi,

i need a possibility to do actions based on some output of a task.
For instance, i have the tomcat_list task (which prints out the
installed applications and their status) and want to stop a specific
application only if the application is allready running.

If this is not possible, how can i achieve that ANT doesnt end
processing on an error of a task.

At the moment i have a application_stop task that breaks when the
application is not running at all. It would be nice if i could control
that the error behavior.

I read through the docs but couldnt find the correct spot.

Thx.

Marc


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: parsing a task output for further processing

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 11 Jun 2002, Marc Logemann <de...@logemann.info> wrote:

> i need a possibility to do actions based on some output of a task.

Maybe writing a BuildListener for this is an option.

> If this is not possible, how can i achieve that ANT doesnt end
> processing on an error of a task.

Don't throw exceptions on failure 8-)

Another option is the TryCatch task from SourceForge's ant-contrib
project.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: parsing a task output for further processing

Posted by Diane Holt <ho...@yahoo.com>.
--- Marc Logemann <de...@logemann.info> wrote:
> i need a possibility to do actions based on some output of a task.
> For instance, i have the tomcat_list task (which prints out the
> installed applications and their status) and want to stop a specific
> application only if the application is allready running.

What does the output look like, and how are you running 'tomcat_list'?

Diane

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



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>