Two Guys Arguing

Custom Continuum Notifier – Step 2: Build a dummy notifier

Posted in java by benjaminplee on 08.07.09

Now that we have Continuum building without any problems, the next step is getting a basic notifier coded up and Continuum aware of it.

The Continuum user wiki makes this process seem simple enough:  create a new notifier extending AbstractContinuumNotifier and register the new notifier in application.xml.  Essentially, this is true … with a few minor modifications.

  1. Create your new notifier project
    1. Under the continuum-notifiers Maven module, create a new module called continuum-notifier-web as a standard Maven project (or dupe one of the existing ones)
    2. Modify the new module’s pom.xml to have continuum-notifiers as its parent and add the continuum-notifier-api artifact as a dependency
    <project ...>
     <name>Continuum :: web-Dashboard</name>
    1. Add the new sub-module to the continuum-notifiers parent pom.xml.
  2. In your new project, create a basic notifier that simply logs that it was called.  This class should extend AbstractContinuumNotifier and implement getType() and sendMessage():
package org.apache.maven.continuum.notification.atkpwadashboard;

import org.apache.maven.continuum.notification.AbstractContinuumNotifier;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WebNotifier extends AbstractContinuumNotifier {
 private Logger log = LoggerFactory.getLogger(getClass());

 public String getType() {
 return "web";

 public void sendMessage(String messageId, MessageContext context)
 throws NotificationException {"Web Notifier has been called!");
  1. Build your new module either by a full build of Continuum or by just building your sub module (mvn package).
  2. Deploy your new notifier
    1. Copy the newly created notifier .jar into your Continuum intallation at <CONTINUUM_BASE_DIR>/apps/continuum/WEB-INF/lib/continuum-notifier-web.jar
    2. Modify <CONTINUUM_BASE_DIR>/apps/continuum/WEB-INF/classes/META-INF/plexus/application.xml to register the new notifier by adding the following code:
  3. Restart Continuum
  4. On one of your managed applications, modify the pom.xml to use the new notifier:
  1. Profit.

Things to note:

  • Continuum uses Plexus for its dependency injection.  Since your notifier is extending AbstractContinuumNotifier which has dependencies, you MUST register your notifier as needing these inject or you will see some lovely and confusing NullPointerExceptions when you try to use the notifier.
  • Technically you don’t need to get Continuum to compile to build a new notifier, but having the source handy and being able to see how the rest of the project is structured helps.
  • I haven’t figured out how to get Continuum builds to auto install my notifier yet …. it is on my to-do list.
  • To simplify creating the new project, I just copied continuum-notifier-jar and made modifications as necessary.
  • The email notifier is called “mail” and is in the continuum-core module.

Big Frustrating Gotcha:  Continuum’s notifier plugin architecture only extends to the internals of Continuum but does NOT include any of the web-app’s GUI.  This means that your new notifier will not show up in any of the admin screens as an option, or have any edit/configuration screens a web user can see.  These GUI elements are managed in the continuum-core and continuum-web-app modules, separate from the notifier code themselves.  For what I was doing I didn’t need this, but it would have been nice.  It looked to be fairly simple to add the new notifier to the approrpiate .jsp’s and have full graphical interface power.

Helpful Links:

  • Continuum user wiki page on building a notifier
  • Email chains one and two talking about doing the same thing
  • Configure your notifier in the application.xml wrong and you might get an error like this

Last step is to make the notifier actually do something related to build ….

Tagged with: , ,

asdf-install innards

Posted in common lisp by youngnh on 08.07.09

asdf-install’s README is good stuff.

For example, I did not know that sbcl has a standalone program for downloading lisp libraries:

sbcl-asdf-install drakma

will do the same thing as the more traditional method of starting sbcl, requiring asdf-install and then installing drakma.

The REAMDE also notes that the arguments to asdf-install may be:

– The name of a cliki page. asdf-install visits that page and finds
the download location from the `:(package)’ tag – usually rendered
as “Download ASDF package from …”

– A URL, which is downloaded directly

– A local tar.gz file, which is installed

If you look at the wiki source of, you’ll see a :(package) tag just as described:

:(package "")

Poking around in the source of asdf-install, you’ll see this:

(let ((url
         (if (= (mismatch package-name-or-url "http://") 7)
             (format nil ""

Which means that cliki generates a url for a page that ends in “?download”. Here’s the headers returned when requesting that url:

GET /Drakma?download HTTP/1.1
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20090718 Shiretoko/3.5.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Fri, 07 Aug 2009 13:50:21 GMT

HTTP/1.x 302 Redirected
Date: Fri, 07 Aug 2009 13:58:26 GMT
Server: Araneida/0.84
Connection: close
Content-Type: text/html
Last-Modified: Fri, 07 Aug 2009 13:58:26 GMT
Pragma: no-cache
Expires: Fri, 30 Oct 1998 14:19:41 GMT

Redirected to the file named in the :(package) tag.

The pages on cliki are freely editable. This means that it is trivially easy to make a piece of software, add a cliki page for it and anyone with asdf-install could install it, which is a fantastic and democratic way to distribute software.

However, by the same token, this is exactly why you should pay attention to the signatures of packages and download any that don’t match or aren’t trusted to see for yourself what you’re getting before loading and executing it.

See the “Making your package downloadable…” section of this cliki page for more details on how to publish your lisp code for all the world to use:

Tagged with: , ,

Get every new post delivered to your Inbox.