Hello,
interesting problem. No dynamic properties. Following works:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" default="test">
<target name="test">
<!-- Sets the value to the current time -->
<tstamp>
<format property="NOW" pattern="MM/dd/yyyy HH:mm:ss"/>
</tstamp>
<echo>${NOW}</echo>
<echo>waiting 5 seconds</echo>
<sleep seconds="5"/>
<tstamp>
<format property="THEN" pattern="MM/dd/yyyy HH:mm:ss"/>
</tstamp>
<echo>${THEN}</echo>
</target>
</project>
Cheers,
André
sukanya schrieb:
Hi,
Here is the problem I am now facing:
<project default='init'>
<target name='init'>
<tstamp>
<format property='TSTAMP' pattern='MM/dd/yyyy HH:MM:SS
z'/>
</tstamp>
<echo file='Time-Log.txtl' append='yes'> ${TSTAMP}</echo>
<buildnumber file='${builddeployv3.dir}/build.number'/>
<echo>ant.version: '${ant.version}'</echo>
<echo>ant.home: '${ant.home}'</echo>
<echo>java.version: '${java.version}'</echo>
<echo file='Time-Log.sql' append='yes'> ${TSTAMP}</echo>
</target>
</project>
Here the time values are added to a file.
Where the file has the same time value twice. But i need to have different
time values with a single <tstamp> element and property. How property values
can be changed dynamically?
Appreciate your suggestion to solve this problem.
Thanks,
Sukanya
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]