Notification Script For Maven Builds On Mac OS X
by Milinda Lakmal
I use Maven every day to build WSO2 Carbon based products and it takes huge amount of time due to the size of WSO2 Carbon platform. So I used to run the build and do some other work until it finishes. But most of the times, I forget to check the build status and this has effected badly on my productivity.
I thought that I could reduce the effect on productivity, if I can trigger some notification sound and a bubble when build is finished. Using Growl notification system(You need to install growlnotify tool as from Growl extras.) and afplay command line tool I came up with the following script which let me trigger notification after invoking any command line tool.
For example think you want to get a notification after a maven build, you can execute the maven command like following(Note: I have named above script growlexec and made it a executable):
growlexec mvn clean install -Dmaven.test.skip=true
This will create notification bubble and will make a sound after the command line tool is done with it’s work.
How can we create something like this for use on Linux?
You can use libnotify to trigger visual notification bubbles. For audio notifications you can use tool like beep.