Ant clean up task

R

rips

Hi,
Is there a way to add a task that runs even after something causes the
build to fail?
I use <parallel> to start a server, and then run unit tests. If a unit
test fails, my build fails.
But I need to stop the server before ending the build process.

so what I have is something like
<parallel failonany="true">
start server
<sequential>
run-tests
stop server
</sequential>
</parallel>

if run tests fails, the build process stops, and the server continues
to run.
I guess i need something like the java try catch
try
start server
run tests
stop server
catch
stop server
halt the failed build

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top