DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21642>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21642

TSTAMP is not working





------- Additional Comments From [EMAIL PROTECTED]  2003-07-16 10:22 -------
Bug verification:
- downloaded on 16.07.2003 from http://www.apache.org/dist/ant/binaries/apache-
ant-1.5.3-1-bin.tar.bz2
- extracting the tar file from the bz2
- extracting all files from the jar
- read the doc for tstamp --> which properties should be set
- write a test buildfile
- run that buildfile with the downloaded version of ant
- test pass

Buildfile:
------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="main">
    <target name="main">
         <antcall target="tstampTest-1"/>
         <antcall target="tstampTest-2"/>
         <antcall target="tstampTest-3"/>
    </target>

    <target name="tstampTest-1">
        <tstamp/>
        <echo>
DSTAMP = ${DSTAMP}
TSTAMP = ${TSTAMP}
TODAY  = ${TODAY}
        </echo>
    </target>

    <target name="tstampTest-2">
        <tstamp prefix="test"/>
        <echo>
DSTAMP = ${test.DSTAMP}
TSTAMP = ${test.TSTAMP}
TODAY  = ${test.TODAY}
        </echo>
    </target>

    <target name="tstampTest-3">
        <tstamp>
            <format property="day" pattern="dd"/>
        </tstamp>
        <echo>
DSTAMP = ${DSTAMP}
TSTAMP = ${TSTAMP}
TODAY  = ${TODAY}
day    = ${day}
        </echo>
    </target>

</project>





Output (Windows 2000):
-----------------------
apache-ant-1.5.3-1>.\bin\ant.bat -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.5.3 compiled on April 16 2003

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.5.3
optional tasks : 1.5.3

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\ZipDrive\04\apache-ant-1.5.3-1\bin\..
ant.jar (737884 bytes)
optional.jar (671546 bytes)
xercesImpl.jar (885250 bytes)
xml-apis.jar (108484 bytes)

-------------------------------------------
 System properties
-------------------------------------------
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : c:\seu\jdk14\jre\bin
java.vm.version : 1.4.0_01-b03
user.country : DE
sun.os.patch.level : Service Pack 2
user.dir : C:\ZipDrive\04\apache-ant-1.5.3-1
os.arch : x86
os.name : Windows 2000




apache-ant-1.5.3-1>.\bin\ant.bat
Buildfile: build.xml

main:

tstampTest-1:
     [echo]
     [echo] DSTAMP = 20030716
     [echo] TSTAMP = 1215
     [echo] TODAY  = July 16 2003
     [echo]

tstampTest-2:
     [echo]
     [echo] DSTAMP = 20030716
     [echo] TSTAMP = 1215
     [echo] TODAY  = July 16 2003
     [echo]

tstampTest-3:
     [echo]
     [echo] DSTAMP = 20030716
     [echo] TSTAMP = 1215
     [echo] TODAY  = July 16 2003
     [echo] day    = 16
     [echo]

BUILD SUCCESSFUL
Total time: 1 second



So <tstamp/> works for me.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to