ANT: Return status from javac task

L

Lax

Hi all,
I dont know if this is the appropriate group for ANT build questions,
sorry if its not.

In my ANT build.xml, I've a compile task calling javac compiler, pretty
basic.
But, before running the javac task the build creates a bunch of temp
files.
If and when the compilation fails, the build exits and I'd like to
delete the temp files before the build finishes/fails.
Is there any way to trap the return status from the javac( or any)
task? Is there any status or ERRORLEVEL like property/environment
variable available after running the task?

Sample code:

<tasks to create bunch of temp files>
<target name="javac">
<javac>
blah blah
</javac>

Check javac return status here...
If javac is successful, do the mail
If javac is not successful, cleanup the temp files
</target>

Any idea how I can test the success of a nested task?

Thanks for your time.
 

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
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top