Tuesday, August 13, 2013

How to display/print current time using Ant


At times, while juggling between lots of things a time, you may forget when the deployment happended or did you actually deployed since you did the last code change!

This small 4 liners can facilitate you with that feature. You can know the last deployed time by looking at the console/terminal.


<tstamp>
    <format property="IST_TIME" pattern="HH:mm:ss:sss zzz" locale="en,In"/>
 </tstamp>
<echo> Build Completed At: ${IST_TIME}</echo>


Add it the last target of your build script that is going to be executed, change the locale to your respective locale, to time in your timezone and you are good to go.

A similar example can be found in my previous post.

       

No comments:

Post a Comment

Prototype

Prototype is another creation pattern. Intent:  - Intent is to create objects by cloning existing instance  - Specify the kinds of obj...