Last updated by duhcati 1 year ago
In order to add unified messaging to your project, install the plugin as follows:
grails install-plugin grom
In addition to send default notifications you can also send custom notifications by
Grom-ing a String:
"bootstrapping application".grom()
If you, at some point in the future, decide to remove the from plugin, either before packaging to a production environment or some other reason. Keep in mind that any custom Grom-ing will break your application as the grom() method will not be available. This can be resolved by using something like:
class MyController {
def pluginManager
…
if (pluginManager.getGrailsPlugin('grom')) "grom this String".grom()
}
The Grom plugin can be in a production package, as it will just not do anything if no notification agent is present. It may spit out a warning to the logfile, but that can be ignored.
Last updated by duhcati 1 year ago
Grom
is Dutch for Growl, which already gives away a hint on what this plugin does. This plugin sends grails notifications to a unified notifications daemon. It is currently compatible with Growl for Mac OS X, Growl for Windows and Notify OSD for Linux.
Development of this plugin was inspired by
N.A.D.D. Neutralizer, a plugin to decrease development latency by using the speech synthesizer to notify you when a project was up and running. While this was very useful at the time and certainly has it's uses (me and my colleagues even gave feedback to improve support), it was a bit too obtrusive for our liking as it started iTunes if not running and at some point you just wished it stopped talking.
So what would be better than to use Growl instead, as it is unobtrusive and the whole reason for running a notification daemon is to unify messaging into a single location. So I developed Grom initially for
Growl on Mac OS X, and I added multi-platform support later by including support for
Growl for Windows and
Notify OSD for Linux which is by default shipped with Ubuntu.

More screenshots are available in the Screenshots tab.
Mac OS X
Most people I know already run
Growl as a notification daemon, so I'm pretty sure I'm not telling you anything new here. In order to have any benefit from this plugin you should install Growl to centralize messages. In case you're not familiar with Growl,
many Mac applications already support Growl integration so it will be an overall improvement to your Mac experience to have Growl installed. With or without using this plugin.
Linux / Ubuntu
The unified messaging implementation in Ubuntu provided through
Notify OSD. I am not entirely sure if it is also available for other distributions, but as Ubuntu is by far the most common distribution used in corporate organizations and home desktop installations, I chose to support Notify OSD. Notify OSD is by default available in (the latest releases of) Ubuntu, however the client binary is not provided so you need to install that to get Grom working on Ubuntu. To do that, just install libnotify-bin and you're good to go:
apt-get install libnotify-bin
While Grom will now work, there are a number of limitations with the default implementation of Notify OSD on Ubuntu:
- the timeout parameter is broken (notifications stay on the screen too long)
- the notifications cannot be customized
- grouping of notifications does not work
Luckily the first two limitations can be solved by using the
Leolik patch for Notify OSD. Unfortunately the latter does not seem to be getting picked up
anytime soon. Perhaps is more people voted the issue up, as support for grouping is already integrated into this plugin.
Windows
Growl for Windows basically is a port of Growl for Mac OS X and brings unified messaging to Windows. To have any benefit from this plugin, you should install Growl for Windows and the
Microsoft .NET Framework (v2.0 or higher)
If you do not have any of the following notification daemons installed or if you're using a platform which is not -yet?- supported, the Grom plugin will just not send any notifications. Which means you can keep it in a project repository where multiple people work on the same project, without breaking the project on machines that do not support unified notifications.
Last updated by duhcati 1 year ago
How do I send a notification?
The plugin extends the String class with a
grom method. So to send a notification you only need to do something like:
"Foo".grom()
"Bar".grom()
4.times { "I have been gromming for ${it} times!".grom() }I am seeing the following error in my logfile:
2010-11-25 14:45:16,079 [main] ERROR plugins.DefaultGrailsPlugin - Grom: please install libnotify in order to receive notifications from the Grom plugin
2010-11-25 14:45:16,082 [main] ERROR plugins.DefaultGrailsPlugin - see http://grails.org/plugin/grom for more information
This message is shown when you're running your application + grom plugin on a supported platform, but a required program is missing. For example, the message above is shown when you're running Linux but libnotify is not available. When this is showing up in catalina.out when you're running your application on an Apache Tomcat server, you can just ignore it as any 'grom' calls will be ignored by the plugin. However, if you run Apache Tomcat on your development machine and you
would like to receive notifications, you need to install the required library. In case of the above example you need to execute the following command on Ubuntu:
apt-get install libnotify-bin
I have installed Growl For Windows but I do not see any notifications?
It's most likely that you did not install the
Microsoft .NET Framework (v2.0 or higher). Please install it as well and the plugin will probably work. The plugin has been confirmed to run properly under both Windows XP as well as Windows 7.
Last updated by duhcati 1 year ago
Grom plugin on Mac OS X with Growl

Grom plugin on Mac OS X with Growl, custom notifications and multiple notifications after eachother

Example code for custom notification:
class BootStrap {
def init = { servletContext ->
// grom what's happening
"bootstrapping application".grom()
…
}
}
If you, at some point in the future, decide to remove the from plugin, either before packaging to a production environment or some other reason. Keep in mind that any custom Grom-ing will break your application as the grom() method will not be available. This can be resolved by using something like:
class MyController {
def pluginManager
…
if (pluginManager.getGrailsPlugin('grom')) "grom this String".grom()
}
Grom plugin on Ubuntu with Notify OSD

Grom plugin on Ubuntu with Notify OSD and custom notifications