

A proprietary version of make was used to build it on the Solaris Operating Environment, but in the open source world there was no way of controlling which platform was used to build Tomcat. That product, Sun's reference JSP/ Servlet engine, later became Apache Tomcat. In conclusion, if you ever need to use the date or time in your Ant build scripts, there's no need to write a bunch of code yourself, you can just use the Apache Ant tstamp task.Ant was conceived by James Duncan Davidson while turning a product from Sun into open source. I haven't fooled around with any custom timestamp formatting yet, but the tstamp doc page includes the following example, which shows how you can create a property with a different name and timestamp formatting pattern: So in my case, I'm just using the default timestamp format. sets the DSTAMP, TSTAMP, and TODAY properties in the current project.īy default, the DSTAMP property is in the format "yyyyMMdd", TSTAMP is in the format "hhmm", and TODAY is in the format "MMMM dd yyyy". Here's a blurb from the tstamp documentation that describes what it does: Here's the code from my Ant script that does this timestamp magic: Īs you can see, this segment of my Ant build script uses the Ant tstamp task, and then uses a variable named TODAY that is created by this task. (This build script is used for building a Java Swing application.) I was just digging through some Ant build scripts I've created, and I noticed a segment of a build script that first creates a timestamp, and then uses that timestamp in the process of creating a manifest file. Summary: An Ant date and timestamp (tstamp) task example.
