ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <>
Subject using tstamp to time a macro execution
Date Thu, 14 Jul 2005 13:42:33 GMT
I currently have a macro definition like so:

<macrodef name="compile.sub.project"> 
<attribute name="projectDir" default="ERROR"/>
<!-- TODO: failure here should fail the build. -->
<java fork="true" dir="${basedir}" classname="com.compiler.compiler" 
classpathref=" <>">
<arg value="../@{projectDir}/build"/>
<format property="BUILD_TIMESTAMP" pattern="MMM dd yyyy HH:mm:ss"/>
<echo>Completed Compile of @{projectDir} At: ${BUILD_TIMESTAMP}</echo>

the issue is that when i call it twice, i get the same time stamp output. 
this is b/c properties are immutable. it'd be nice to be able to time the 
execution of the macrodef, display start/stop time, and even time 
difference. ideas? suggestions?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message