Using Ant As An Installer
By Adrian Sutton
Since its inception, our IWWCM integration has been a bit of a pain to install – the instructions differed based on which version of IWWCM you where running and which version of WebSphere or Workplace you used and you had to move and edit files in various locations. Nothing difficult but it was just too easy to forget a step and have things go wrong.
The simplest way to improve things – provide an installer that automates the process. The problem is, most installer tools are ridiculously complex to work with because they attempt to provide a way to do anything you could ever want. It would have taken us days just to get our heads around how to use the tools.
Instead, we whipped up a simple ant script, bundled a copy of Apache Ant, and provided a simple .bat file to start the process up. We’ll probably also provide a shell script for UNIX systems and we’d like to investigate getting it working on AIX but we don’t yet have a copy and none of us know anything much about it. Most of the installation problems we’ve seen are on Windows so that’s the main thing to get working.
Ant turns out to have some pretty compelling advantages – it’s cross-platform, very simple to write and modify, works well with version control and automated build processes and all the engineers are already familiar with it. One advantage I hadn’t thought of until I got home this afternoon – having an ant installer allows the install to be done completely from the command line which I’m sure will be greatly appreciated by those sys-admins who run their IWWCM installs on a headless box.
The extensibility of ant is great too, we had to write one custom task to find the right path to use since a particularly directory name we needed changes every time IBM release a patch so it had to be found dynamically. In under half an hour we had it written and working – I think it took longer to write the documentation to explain how to find the path than it was to get ant to find it automatically.
All in all, I’m impressed – for simple, server installations this looks like a great option. There’s no way it cuts it for client side installations, though there have been a couple of attempts at providing a friendly GUI, none have yet succeeded. For client side installs it’s probably worth learning the details of a real installer and using that instead.