« Current Trips Planned
» What’s in your bag?

technology

Adding a time stamp to Ant calls

03.06.08 | Comment?

Warning: Lame programming entry

If you are like me, you might have the bad habit of editing small pieces of code, building it, then running the code, then doing it again. Sometimes if I’m distracted, I forget if I even ran the build. I kept wishing that Ant added a time stamp to show when the last build that was done. I know I could probably add a time stamp output in the build script, but I didn’t want to have to do this to every build script I used. One easy way to add a time stamp to output on any “Ant” call is to edit the Ant executable file.

By adding a simple keyword, ‘date’, to the ant executable file, whenever you call “ant” from the command line, the date will be outputted.

Here is the very simple example (italicized):

Edit this file: “C:\apache-ant-1.6.5\bin\ant”

ant.JPG

Adding that simple keyword will yield the following output:

tstamp.JPG

Well, this is my solution, does anyone know better one?

have your say

You can skip to the end and leave a response. Pinging is currently not allowed.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« Current Trips Planned
» What’s in your bag?