tags:

views:

19

answers:

1

Without writing a custom ant task is there a way to use a timeout on a regular ant target? To give some background info ... we are using the delete task to remove all contents of a given directory. Sometimes this directory is massive with lots of generated folders and files. We wanted to have that task say timeout after 5 minutes. I could not find anything online anywhere ... any ideas?

A: 

You might use the parallel task, which has a timeout, with a parallel degree of one:

<target name="timed_del">
    <parallel threadCount="1" timeout="300000">
        <sequential>
            ... your tasks here ...
        </sequential>
    </parallel>
</target>
martin clayton
Yea this works. I've used parallel before but I did not even think to use it here ... not sure why. But thanks for the point in the right direction.
Christopher Dancy