You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Christopher Peerman <cp...@mpc-data.co.uk> on 2002/11/14 16:14:31 UTC
Try task
I have developed a Try Task which calls another target on a "Build
Exception", I have been using it now to two weeks and it seems to work quite
well.
<?xml version="1.0"?>
<project name="TryExample" default="main" basedir=".">
<!-- Used to load the task -->
<taskdef name="try" classname="ant.Try"/>
<!-- Main build method -->
<target name="main">
<!-- Try is a wrapper for other tasks. If an error occurs the target
errorhandler is called
-->
<try handler="errorhandler">
<javac srcdir="." destdir="."/>
</try>
</target>
<target name="errorhandler">
<echo "error occured"/>
<target/>
</project>
I was wondering whether it would be useful in the ANT project.
Yours sincerely,
Christopher Peerman.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Try task
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 14 Nov 2002, Christopher Peerman <cp...@mpc-data.co.uk>
wrote:
> I was wondering whether it would be useful in the ANT project.
There already is one in the ant-contrib project, see
<http://ant-contrib.sourceforge.net/ant-contrib/manual/tasks/index.html>.
Maybe you can enhance the task over there with ideas from your task?
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>