Sunday, July 08, 2007

Ha ha! Take that, ${temp.dir}!

I don't often celebrate removing weird things from the Ant build on projects - it's part of my job. But this one was special. ${temp.dir} used to point to the /tmp directory on the build servers. Several targets would read or write artifacts into that directory. ${temp.dir} had probably had a very simple job when it was conceived, but over time things had been twisted to do more with it. It bugged me.

Over some weeks it had been a part-time hobby of mine to make small changes to the build so that I could finally remove ${temp.dir}. And recently I actually did remove it. I find that by finding something that irritates me, and reflecting on a way to remove it, I end up simplifying things in the process. I often end up breaking things if I jump in and fix it; so I force myself to make small steps in fixing the problem until the day comes that I can remove that-which-bugs-me with confidence. This usually has the happy side effect of making the build more robust and easier to understand.

Now I'm looking at cruise-properties.xml. It'll have to go.

No comments: