When you have a long process and want to be notified when it is finished, without to stay focused on the console windows. Then use the GrowlNotify task.
This task requires the PEAR Net_Growl package installed (version 2.6.0).
Features
Compatible Windows and Mac/OSX
Do not forget notification with sticky option
Define priority of messages
Send notification on private or public network
Table C.25: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
name | String | Name of application to be register | Growl for Phing | No |
sticky | Boolean | Indicates if the notification should be sticky on desktop | false | No |
message | String | Text of notification. Use \n to specify a line break | n/a | Yes |
title | String | Title of notification | GrowlNotify | No |
notification | String | The notification name/type | General Notification | No |
appicon | String |
| n/a | No |
host | String | The host address where to send the notification | 127.0.0.1 | No |
password | String | The password required to send notifications over network | n/a | No |
priority | String |
The notification priority. Valid values are :
| normal | No |
protocol | String | The protocol used to send the notification. May be either gntp or udp. | gntp | No |
icon | String |
The icon to show for the notification. Must be a valid file type (png, jpg, gif, ico). Can be any of the following:
| embedded growl icon v2 | No |
Send a single notification on a remote host
Both sender and Growl client (Mac or Windows) should share the same password.
<?xml version="1.0" encoding="UTF-8"?> <project name="phing-GrowlNotifyTask" basedir="." default="notification"> <target name="notification" description="display a single message with growl gntp over network" > <growlnotify message="Deployment of project LAMBDA is finished." host="192.168.1.2" password="seCretPa$$word" /> </target> </project>
Send a single notification with UDP protocol
When you don't have a Macintosh, OS compatible with Growl GNTP, you should use the basic UDP protocol.
<?xml version="1.0" encoding="UTF-8"?> <project name="phing-GrowlNotifyTask" basedir="." default="notification"> <target name="notification" description="display a single message with growl udp over network" > <growlnotify message="Notify my MAC that does not accept GNTP." host="192.168.1.2" password="seCretPa$$word" protocol="udp" /> </target> </project>
Send an important notification
If you want to send a notification that is so important that you don't want to missed it, even if you are away from your computer. Use the sticky attribute.
<?xml version="1.0" encoding="UTF-8"?> <project name="phing-GrowlNotifyTask" basedir="." default="notification"> <target name="notification" description="display a sticky message on desktop" > <growlnotify message="Project LAMDBA, unit tests FAILED." priority="high" sticky="true" /> </target> </project>
Use your icons to identify an application
You may customize the Growl notification system, with different icons and more.
<?xml version="1.0" encoding="UTF-8"?> <project name="phing-GrowlNotifyTask" basedir="." default="notification"> <target name="notification" description="display a custom icon message" > <growlnotify message="Have a look on my beautiful message!" name="phing Notifier" title="phing notification" priority="low" sticky="false" appicon="../images/my_icon.png" /> </target> </project>