ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Tyler" <gordon.ty...@sitraka.com>
Subject Programmatically stopping build
Date Mon, 25 Mar 2002 19:41:03 GMT
Hi,

I'm writing a tool called AntShell which provides a command shell-like
interface to Ant where target names are commands that can be executed to
start a build of that target. The tool has been implemented similarly to the
normal Ant Main class, i.e. it uses the Project class, etc. directly.

One of the features I would like to implement is to allow the user to press
a key-combination to interrupt the current build without interrupting
AntShell (as Ctrl-C would do). However, I am having difficulty figuring out
exactly how to stop Ant's current build as initiated by
Project.executeTarget().

I could start the build on a new Thread and use Thread.stop() but that's
severely deprecated and for good reasons too. I could use Thread.interrupt()
but there are no points (that I could find) in the Ant build code path that
check for InterruptedException or Thread.isInterrupted and I've actually
written some test code that uses this and it definitely doesn't work.

Any suggestions? How is the Ant GUI handling this?

Thanks,
Gordon



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


Mime
View raw message