Build Tools

A little while ago Stefan was blogging a fair bit about Microsoft’s answer to Ant, MSBuild. I haven’t gone into it in any depth but I think it was an interesting development.

In fact a good friend of mine who is the convenor of a local .Net user group once asked me to do a talk about my experiences with Ant for the .Net folks. It never came off but my tentative title was “F7 is not a build system”. Well I didn’t know what function key you use to do a build in Visual Studio at the time, but you get the idea.

Anyway, I see Stefan has some more blogs on what various people think of build systems.

I came across another, MBuild via Miguel de Icaza’s blog, which has a slightly different take on the idea of build systems.

Ant 1.6 Developments

I’ve not been able to work on Ant much lately due to other commitments – things like the Bathurst 1000, Rugby World Cup, work, etc. In fact I have been doing some of .net development but more on that later.

Many of the other Ant developers have been busy however, working on the issues surrounding <macrodef> and <local>. Right now, <local> will be held over for the next release and <macrodef> gets a new attribute substitution syntax. I reckon we’ll have a new beta (Beta 3) next week sometime.

Someone recently asked how stable the Ant betas are. It’s a bit of a catch-22 situation. If nobody tests the beta then it is sure that the beta is as stable as the following release. IMHO, it’s better to give the beta a whirl now so that we can fix any showstoppers without needing to do another release.

In other Ant news, we’ve added Peter Reilly and Antoine LÚvy-Lambert to the Ant PMC.

Welcome Stefan

Long time Ant committer, Stefan Bodewig, has a blog. Stefan is one of the nicest, most helpful and most knowledgeable people I have had the fortune to work with as part of open-source development. I look forward to his blog.

Ant 1.6 Beta is out

The first beta for Ant 1.6 is out and it has a lot of changes, both bug fixes and new functionality. I think it warrants a reasonably long beta period. The main thing now is to get people to try it out.

This release establishes a few building blocks which will be used and expanded upon in the following releases. I’m hopeful this can simplify the management of classpaths for the optional jars which has often caused problems.

One new component is the new launch code which moves the initial classpath creation into Java code. Ant is now launched with a very minimal classpath and then picks up the main Ant jars. The jars can now come from any arbitrary directory – not just ANT_HOME/lib using the new -lib option. This should better support standard installations without the need to stick jars into the Ant install.

Another component is the new antlib concept. I’m hopeful that in future releases we won’t deploy tasks in the base classloader for which the required support classes are not available. These tasks could then be deployed on demand with a build file specified classpath picking up the required libraries. Currently in Ant, and this remains true in Ant 1.6, the jars which support optional tasks need to be known when Ant starts up. In Ant 1.6, they can, however, live outside the Ant installation.

Anyway, that is just a taste of the new stuff in this release and what it bodes for the future. There’s lots more. Obviously such a large number of changes has the potential to cause some hiccups for existing setups. We’ve worked to minimize problems but we want to know about any during the beta period. So, go check it out – try your existing builds.

Shutdown hooks

I recently worked on an Ant bug report to do with shutdown hooks. This bug involves the firing of shutdown hooks in JVMs started with Ant’s <java> task when Ant itself is shutdown.

The bug in Ant was that these processes were not given time to complete once they had been destroyed (that sounds pretty funny but it’s true). i.e. These processes did not get to fire or complete their own shutdown hooks. This is now fixed. Unfortunately that only works on Unix systems since Windows does not fire the shutdown hook at all. JDK 1.3 seems to fire the shutdown hook but it is not allowed to complete fully. JDK 1.4 does not fire it at all.

I’m not into bashing Sun but the “Not a bug” response in Bug 4485742 leaves me nonplussed. I’ve added my 2c but I doubt anyone would see this. Perhaps it is worth raising this again as a new bug.