I have a whole new set of questions now :)

I am using continuum Version 1.1-beta-3. I have jar'ed up my code and added the jar to apps/continuum/webapp/WEB-INF/lib/. I have used the web interface to continuum to set up the IRC notifier and that is working. I don't see how to configure the project to call my notifier.

Also, can you provide some insight on what I need to do to get a gui set up for my notifier. I assume this also requires some additional configuration to persist values.

Thanks in advance,
Mike Masters

##################################################################
# I have created the following test class:
##################################################################


package com.rallydev.integration.build.continuum;


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

import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class RallyContinuumNotifier
    extends AbstractContinuumNotifier
{

public void sendNotification( String source, Set recipients, Map configuration, Map context ) { getLogger().info("THIS IS MY TEST from sendNotification 4 arg");
    }

public void sendNotification( String arg0, Set arg1, Properties arg2 ) { getLogger().info("THIS IS MY TEST from sendNotification 3 arg");
    }
}

##################################################################
# I have the following in apps/continuum/conf/application.xml
##################################################################
<application>
  <services>
    <service>
      <id>jetty</id>
      <configuration>
        <webapps>
          <webapp>
<file>${plexus.home}/lib/continuum-webapp-1.1- beta-3.war</file>
            <context>/continuum</context>
            <extraction-path>${plexus.home}/webapp</extraction-path>
            <standardWebappClassloader>true</standardWebappClassloader>
            <listeners>
              <http-listener>
                <port>${jetty.port}</port>
              </http-listener>
              <!--
              <proxy-http-listener>
                <port>8090</port>
                <proxy-host>localhost</proxy-host>
                <proxy-port>80</proxy-port>
              </proxy-http-listener>
              -->
            </listeners>
          </webapp>
        </webapps>
      </configuration>
    </service>
  </services>

  <components>
    <!--
    | The rally notifier
    |-->
    <component>
      <role>org.codehaus.plexus.notification.notifier.Notifier</role>
      <role-hint>rally-continuum</role-hint>
<implementation>com.rallydev.integration.build.continuum.RallyContinuumN otifier</implementation>
      <requirements>
        <requirement>
        </requirement>
      </requirements>
      <configuration>
        <alwaysSend>true</alwaysSend>
      </configuration>
    </component>

  </components>
</application>



On Oct 5, 2007, at 1:15 AM, Emmanuel Venisse wrote:



Michael Masters a écrit :
I've looked at JabberContinuumNotifier and I have some questions on how I create my own notifier. 1. Once I write my notifier by extending AbstractContinuumNotifier, how do I install it. In other words, where do I put it the class file? Can I jar up all my classes and place them somewhere?

To build your notifier, run 'mvn clean install' on your notifier project to create the jar then put it under apps/continuum/webapp/ WEB-INF/lib/

2. Can someone explain how I am suppose to configure my notifier in apps/continuum/conf/application.xml?

    <component>
      <role>org.codehaus.plexus.notification.notifier.Notifier</role>
      <role-hint>your_notifier_id</role-hint>
      <implementation>package.notifier_class</implementation>
    </component>
* It looks like the <requirement> tag is suppose to define some classes that my notifier is dependent on. Is this true?

If you have some requirement in your class like 'ConfiguredService' declared like that in jabber notifier class:
    /**
     * @plexus.requirement
     */
    private ConfigurationService configurationService;
you must add it in the <requirement> tag in application.xml, so plexus will set and initialize configurationService automatically.
* What's allowed in the <configuration> tag? For example, I need things like login ID, password, and URL to configure the notifier. I assume I add tags for this in <configuration>. Is this true? If so, then how do I get to this information from my notifier?

The configuration part is to initialize your notifier when it is created by plexus. If in your configuration, you add <password>myPassword</password>, plexus will initialize the private password field in your class automatically.

Plexus site: http://plexus.codehaus.org

If you want to use your notifier from the UI, you'll need to add some new JSPs in the webapp and modify some other to add your notifier.

Emmanuel


Reply via email to