Skip to main content


Showing posts from August, 2007

Macrodef makes Ant stronger

I found new macrodef feature in ant extremely useful in my code development. It allows me to reuse lots of code and save time. Here is a quick example on how to use macrodef and why it is cool

Let’s say I have several web applications that I need to deploy on the same web server. If I use a regular Ant task, I would have to replicate these lines of code for every application:

<wldeploy action="deploy"
targets="myWebSiteDomain" />

I know it does not look that bad, but this is just a short sample. In a real world case, I also need to compile the application, generate a WAR file, deploy it, generate a client stub, etc. So, the Ant build.xml tends to grow very fast. In one of my prev…

Some Perforce Tips

Here is a small one line command that I created to find all local files, i.e. the files that still need to be added to the repository:

find . -type f -print | xargs p4 filelog -m 1 | grep "not on client"

I like to work with svn more. The "svn status" makes the same thing much more easier.