[EMAIL PROTECTED] wrote:

I must admit that this area seems to be a real shortcoming in existing ANT 
tasks - not being able to reliably swallow errors in subtasks, whatever they 
may be.

When I was trying to solve this problem before, there were suggestions as to 
how I can check that the specific task (tomcat undeploy) would succeed before 
executing it, rather than being able to support a failonerror property. This 
pre-validation is of course much more complex and less useful for similar 
problems but which aren't for tomcat related tasks.

Is there a straightforward way to create a Task which swallows errors 
generically, regardless of the type of task. Can it be built?

I didn't try it but when I was looking for a solution to my problem I saw that ant-contrib has a <try> tak. They are speaking about catching BuildException, not sure if it would catch other.

From: Nicolas Vervelle [mailto:[EMAIL PROTECTED]

Hi again,

I found how to overcome this problem : I first try to run xgettext2 with <exec> task and with only one arg (--help) abd with attributes failifexecutionfails="false" resultproperty="xxx" just to check for xgettext2 existence.

Then I can use <apply> if xgettext2 exists.

To me, it really seems to be a bug in failifexecutionfails="false" for the <apply> task. It doesn't work, at least not in the same way of the <exec> task.



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

Reply via email to