ANT + Growl notifications = Happy Coder

We have a bunch of projects around here that we build with ANT. One of the biggest gripes with ANT builds and Flex is the amount of time it can take – Flex compiles can be slow. So whilst I’m building a project, I usually end up getting distracted for 10 or 15 minutes by something else, and my newly compiled Flex project sits there waiting for me to return. When I do return I have inevitably forgotten what I was doing.

Enter Growl and ant-growlnotify (thanks Jamie) with the ANT -listener argument. Using it is pretty simple:

  1. Download the ant-growllistener-0.4.jar from google code
  2. Drop the jar into your ant’s lib directory
  3. Run your ANT script with the -library arguement set to com.google.code.ant.growlnotify.GrowlListener
    or add -listener
    com.google.code.ant.growlnotify to ANT_ARGS
  4. Now when you run your ANT script you should get nice Growl notifications.

You’ll need to make sure that you’ve installed growlnotify. growlnotify is in the Extras folder when you install Growl.

In the same notification vein, I also tracked down ImTask last night and got build norifications going with an XMPP server. The project seems a little dated (released in 2003), but still works with OpenFire and Jabber.org.

Cairngen 1.0 – Now with ANT

Eric Feminella created Cairngen as a code generation tool for Adobe Cairngorm. he developed it to do away with the redundant copy/paste work needed to create Flex applicatoins with Cairngorm and is released under the MIT license.

Cairngen 1.0 is built entirely in Ant and provides a solution for one-shot code generation of Adobe Cairngorm 2.2 classes.

I haven’t had a chance to play with Caringen 1.0, but can’t wait (I love ANT!).

Thanks Eric!

Using FlashCommand in Eclipse

Recently I pulled down Mike Chambers FlashCommand. FlashCommand is a command line compiler for the Flash IDE.

I wanted to set up an ANT build script to execute builds from Eclipse without having to alt-tab between programs (yes, I’m that lazy!).

Setting up the ANT script wasn’t too difficult, even for someone who knew the absolute minimum about ANT.

[xml]< ?xml version=”1.0″?>

Sample Build file for a project with FlashCommand, ANT

[/xml][Download the sample build script.]