tags:

views:

215

answers:

3

I want to print the execution time taken for each individual ANT target and its dependent targets.

<target name="target1" depends="target2, target3"> 
....
</target>

When run should show following output

Target 2 - x seconds
Target 3 - y seconds
Target 1 - z seconds

Any suggestions on how to achieve this?

A: 

There is the TStamp task that you can use to demark your other tasks.

See here: http://ant.apache.org/manual/CoreTasks/tstamp.html

There is some extension/addon that will do it all for you without having to do this. Will scrabble around for it if no-one comes up with it first.

Tom Duckering
A: 

Custom loggers aren't hard to write.

+1  A: 

Hi,

use one of those listeners from ant addon taskcollections =

antutility antelope antcontrib

or check their sources and roll your own listener ;-)

Regards, Gilbert

Rebse