continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r191140 - in /maven/continuum/trunk/continuum-notifiers: ./ continuum-jabber-notifier/ continuum-jabber-notifier/src/ continuum-jabber-notifier/src/main/ continuum-jabber-notifier/src/main/java/ continuum-jabber-notifier/src/main/java/org/ continuum-jabber-notifier/src/main/java/org/apache/ continuum-jabber-notifier/src/main/java/org/apache/maven/ continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/ continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/ continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/ continuum-msn-notifier/ continuum-msn-notifier/src/ continuum-msn-notifier/src/main/ continuum-msn-notifier/src/main/java/ continuum-msn-notifier/src/main/java/org/ continuum-msn-notifier/src/main/java/org/apache/ continuum-msn-notifier/src/main/java/org/apache/maven/ continuum-msn-notifier/src/main/java/org/apache/maven/continuum/ continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/ continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/
Date Fri, 17 Jun 2005 12:24:23 GMT
Author: evenisse
Date: Fri Jun 17 05:24:22 2005
New Revision: 191140

URL: http://svn.apache.org/viewcvs?rev=191140&view=rev
Log:
o Add jabber notifier
o Add MSN notifier

Added:
    maven/continuum/trunk/continuum-notifiers/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/   (with props)
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/pom.xml
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/
    maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/   (with props)
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/pom.xml
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/
    maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/pom.xml

Propchange: maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jun 17 05:24:22 2005
@@ -0,0 +1,3 @@
+target
+.classpath
+.project

Added: maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/pom.xml?rev=191140&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/pom.xml (added)
+++ maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/pom.xml Fri Jun 17
05:24:22 2005
@@ -0,0 +1,18 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.continuum</groupId>
+    <artifactId>continuum-parent-notifiers</artifactId>
+    <version>1.0-alpha-3-SNAPSHOT</version>
+  </parent>
+  <artifactId>continuum-jabber-notifier</artifactId>
+  <name>Continuum Jabber Notifier</name>
+  <version>1.0-alpha-3-SNAPSHOT</version>
+  <dependencies>
+    <dependency>
+      <groupId>plexus</groupId>
+      <artifactId>plexus-jabber</artifactId>
+      <version>1.0-alpha-1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>

Added: maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java?rev=191140&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
(added)
+++ maven/continuum/trunk/continuum-notifiers/continuum-jabber-notifier/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
Fri Jun 17 05:24:22 2005
@@ -0,0 +1,317 @@
+package org.apache.maven.continuum.notification.jabber;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
+import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.project.ContinuumProject;
+import org.codehaus.plexus.jabber.JabberClient;
+import org.codehaus.plexus.jabber.JabberClientException;
+import org.codehaus.plexus.notification.NotificationException;
+import org.codehaus.plexus.notification.notifier.AbstractNotifier;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id: $
+ */
+public class JabberContinuumNotifier
+    extends AbstractNotifier
+    implements Initializable
+{
+    // ----------------------------------------------------------------------
+    // Requirements
+    // ----------------------------------------------------------------------
+
+    /** plexus.configuration */
+    private JabberClient jabberClient;
+
+    // ----------------------------------------------------------------------
+    // Configuration
+    // ----------------------------------------------------------------------
+
+    /**
+     * @plexus.configuration
+     */
+    private String fromAddress;
+
+    /**
+     * @plexus.configuration
+     */
+    private String fromPassword;
+
+    /**
+     * @plexus.configuration
+     */
+    private String host;
+
+    /**
+     * @plexus.configuration
+     */
+    private String port;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private Map configuration;
+
+    private Set recipients;
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void initialize()
+    {
+    }
+
+    // ----------------------------------------------------------------------
+    // Notifier Implementation
+    // ----------------------------------------------------------------------
+
+    public void sendNotification( String source, Set recipients, Map configuration, Map context
)
+        throws NotificationException
+    {
+        this.configuration = configuration;
+
+        this.recipients = recipients;
+
+        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT
);
+
+        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD
);
+
+        if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_STARTED ) )
+        {
+            buildStarted( project );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_CHECKOUT_STARTED
) )
+        {
+            checkoutStarted( project );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_CHECKOUT_COMPLETE
) )
+        {
+            checkoutComplete( project );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_RUNNING_GOALS
) )
+        {
+            runningGoals( project, build );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_GOALS_COMPLETED
) )
+        {
+            goalsCompleted( project, build );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE
) )
+        {
+            buildComplete( project, build );
+        }
+        else
+        {
+            getLogger().warn( "Unknown source: '" + source + "'." );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private void buildStarted( ContinuumProject project )
+    throws NotificationException
+    {
+        sendMessage( project, null, "Build started." );
+    }
+
+    private void checkoutStarted( ContinuumProject project )
+    throws NotificationException
+    {
+        sendMessage( project, null, "Checkout started." );
+    }
+
+    private void checkoutComplete( ContinuumProject project )
+    throws NotificationException
+    {
+        sendMessage( project, null, "Checkout complete." );
+    }
+
+    private void runningGoals( ContinuumProject project, ContinuumBuild build )
+    throws NotificationException
+    {
+        sendMessage( project, build, "Running goals." );
+    }
+
+    private void goalsCompleted( ContinuumProject project, ContinuumBuild build )
+    throws NotificationException
+    {
+        if ( build.getError() == null )
+        {
+            sendMessage( project, build, "Goals completed. state: " + build.getState() );
+        }
+        else
+        {
+            sendMessage( project, build, "Goals completed." );
+        }
+    }
+
+    private void buildComplete( ContinuumProject project, ContinuumBuild build )
+    throws NotificationException
+    {
+        if ( build.getError() == null )
+        {
+            sendMessage( project, build, "Build complete. state: " + build.getState() );
+        }
+        else
+        {
+            sendMessage( project, build, "Build complete." );
+        }
+    }
+
+    private void sendMessage( ContinuumProject project, ContinuumBuild build, String msg
)
+        throws NotificationException
+    {
+        String message = "Build event for project '" + project.getName() + "':" + msg;
+
+        jabberClient.setHost( getHost() );
+
+        if ( configuration.containsKey( "port" ) )
+        {
+            jabberClient.setPort( ( (Integer) configuration.get( "port" ) ).intValue() );
+        }
+
+        jabberClient.setUser( getUsername() );
+
+        jabberClient.setPassword( getPassword() );
+
+        try
+        {
+            jabberClient.connect();
+
+            jabberClient.logon();
+
+            for ( Iterator i = recipients.iterator(); i.hasNext(); )
+            {
+                String recipient = (String) i.next();
+
+                if ( isGroup() )
+                {
+                    jabberClient.sendMessageToGroup( recipient, message );
+                }
+                else
+                {
+                    jabberClient.sendMessageToUser( recipient, message );
+                }
+            }
+        }
+        catch ( JabberClientException e )
+        {
+            throw new NotificationException( "Exception while sending message.", e );
+        }
+        finally
+        {
+            try
+            {
+                jabberClient.logoff();
+            }
+            catch ( JabberClientException e )
+            {
+
+            }
+        }
+
+        if ( build != null && !StringUtils.isEmpty( build.getError() ) )
+        {
+            System.out.println( build.getError() );
+        }
+    }
+
+    /**
+     * @see org.codehaus.plexus.notification.notifier.Notifier#sendNotification(java.lang.String,
java.util.Set, java.util.Properties)
+     */
+    public void sendNotification( String arg0, Set arg1, Properties arg2 )
+        throws NotificationException
+    {
+        throw new NotificationException( "Not implemented." );
+    }
+
+    private String getHost()
+    {
+        if ( configuration.containsKey( "host" ) )
+        {
+            return (String) configuration.get( "host" );
+        }
+        else
+        {
+            if ( configuration.containsKey( "address" ) )
+            {
+                String username = (String) configuration.get( "address" );
+
+                if ( username.indexOf( "@" ) > 0 )
+                {
+                    return username.substring( username.indexOf( "@" ) + 1 );
+                }
+            }
+        }
+
+        return host;
+    }
+
+    private String getUsername()
+    {
+        if ( configuration.containsKey( "address" ) )
+        {
+            String username = (String) configuration.get( "address" );
+
+            if ( username.indexOf( "@" ) > 0 )
+            {
+                username = username.substring( 0, username.indexOf( "@" ) );
+            }
+
+            return username;
+        }
+
+        return fromAddress;
+    }
+
+    private String getPassword()
+    {
+        if ( configuration.containsKey( "password" ) )
+        {
+            String password = (String) configuration.get( "password" );
+
+            return password;
+        }
+
+        return fromPassword;
+    }
+
+    private boolean isGroup()
+    {
+        if ( configuration.containsKey( "isGroup" ) )
+        {
+            return ( (Boolean) configuration.get( "isGroup" ) ).booleanValue();
+        }
+        else
+        {
+            return false;
+        }
+    }
+}

Propchange: maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jun 17 05:24:22 2005
@@ -0,0 +1,3 @@
+target
+.classpath
+.project

Added: maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/pom.xml?rev=191140&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/pom.xml (added)
+++ maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/pom.xml Fri Jun 17 05:24:22
2005
@@ -0,0 +1,18 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.continuum</groupId>
+    <artifactId>continuum-parent-notifiers</artifactId>
+    <version>1.0-alpha-3-SNAPSHOT</version>
+  </parent>
+  <artifactId>continuum-msn-notifier</artifactId>
+  <name>Continuum MSN Notifier</name>
+  <version>1.0-alpha-3-SNAPSHOT</version>
+  <dependencies>
+    <dependency>
+      <groupId>plexus</groupId>
+      <artifactId>plexus-msn</artifactId>
+      <version>1.0-alpha-1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>

Added: maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java?rev=191140&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
(added)
+++ maven/continuum/trunk/continuum-notifiers/continuum-msn-notifier/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
Fri Jun 17 05:24:22 2005
@@ -0,0 +1,257 @@
+package org.apache.maven.continuum.notification.msn;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
+import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.project.ContinuumProject;
+import org.codehaus.plexus.msn.MsnClient;
+import org.codehaus.plexus.msn.MsnException;
+import org.codehaus.plexus.notification.NotificationException;
+import org.codehaus.plexus.notification.notifier.AbstractNotifier;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id: $
+ */
+public class MsnContinuumNotifier
+    extends AbstractNotifier
+    implements Initializable
+{
+    // ----------------------------------------------------------------------
+    // Requirements
+    // ----------------------------------------------------------------------
+
+    /** plexus.configuration */
+    private MsnClient msnClient;
+
+    // ----------------------------------------------------------------------
+    // Configuration
+    // ----------------------------------------------------------------------
+
+    /**
+     * @plexus.configuration
+     */
+    private String fromAddress;
+
+    /**
+     * @plexus.configuration
+     */
+    private String fromPassword;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private Map configuration;
+
+    private Set recipients;
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void initialize()
+    {
+    }
+
+    // ----------------------------------------------------------------------
+    // Notifier Implementation
+    // ----------------------------------------------------------------------
+
+    public void sendNotification( String source, Set recipients, Map configuration, Map context
)
+        throws NotificationException
+    {
+        this.configuration = configuration;
+
+        this.recipients = recipients;
+
+        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT
);
+
+        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD
);
+
+        if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_STARTED ) )
+        {
+            buildStarted( project );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_CHECKOUT_STARTED
) )
+        {
+            checkoutStarted( project );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_CHECKOUT_COMPLETE
) )
+        {
+            checkoutComplete( project );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_RUNNING_GOALS
) )
+        {
+            runningGoals( project, build );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_GOALS_COMPLETED
) )
+        {
+            goalsCompleted( project, build );
+        }
+        else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE
) )
+        {
+            buildComplete( project, build );
+        }
+        else
+        {
+            getLogger().warn( "Unknown source: '" + source + "'." );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private void buildStarted( ContinuumProject project )
+    throws NotificationException
+    {
+        sendMessage( project, null, "Build started." );
+    }
+
+    private void checkoutStarted( ContinuumProject project )
+    throws NotificationException
+    {
+        sendMessage( project, null, "Checkout started." );
+    }
+
+    private void checkoutComplete( ContinuumProject project )
+    throws NotificationException
+    {
+        sendMessage( project, null, "Checkout complete." );
+    }
+
+    private void runningGoals( ContinuumProject project, ContinuumBuild build )
+    throws NotificationException
+    {
+        sendMessage( project, build, "Running goals." );
+    }
+
+    private void goalsCompleted( ContinuumProject project, ContinuumBuild build )
+    throws NotificationException
+    {
+        if ( build.getError() == null )
+        {
+            sendMessage( project, build, "Goals completed. state: " + build.getState() );
+        }
+        else
+        {
+            sendMessage( project, build, "Goals completed." );
+        }
+    }
+
+    private void buildComplete( ContinuumProject project, ContinuumBuild build )
+    throws NotificationException
+    {
+        if ( build.getError() == null )
+        {
+            sendMessage( project, build, "Build complete. state: " + build.getState() );
+        }
+        else
+        {
+            sendMessage( project, build, "Build complete." );
+        }
+    }
+
+    private void sendMessage( ContinuumProject project, ContinuumBuild build, String msg
)
+        throws NotificationException
+    {
+        String message = "Build event for project '" + project.getName() + "':" + msg;
+
+        msnClient.setLogin( getUsername() );
+
+        msnClient.setPassword( getPassword() );
+
+        try
+        {
+            msnClient.login();
+
+            for ( Iterator i = recipients.iterator(); i.hasNext(); )
+            {
+                String recipient = (String) i.next();
+
+                msnClient.sendMessage( recipient, message );
+            }
+        }
+        catch ( MsnException e )
+        {
+            throw new NotificationException( "Exception while sending message.", e );
+        }
+        finally
+        {
+            try
+            {
+                msnClient.logout();
+            }
+            catch ( MsnException e )
+            {
+
+            }
+        }
+
+        if ( build != null && !StringUtils.isEmpty( build.getError() ) )
+        {
+            System.out.println( build.getError() );
+        }
+    }
+
+    /**
+     * @see org.codehaus.plexus.notification.notifier.Notifier#sendNotification(java.lang.String,
java.util.Set, java.util.Properties)
+     */
+    public void sendNotification( String arg0, Set arg1, Properties arg2 )
+        throws NotificationException
+    {
+        throw new NotificationException( "Not implemented." );
+    }
+
+    private String getUsername()
+    {
+        if ( configuration.containsKey( "address" ) )
+        {
+            String username = (String) configuration.get( "address" );
+
+            if ( username.indexOf( "@" ) > 0 )
+            {
+                username = username.substring( 0, username.indexOf( "@" ) );
+            }
+
+            return username;
+        }
+
+        return fromAddress;
+    }
+
+    private String getPassword()
+    {
+        if ( configuration.containsKey( "password" ) )
+        {
+            String password = (String) configuration.get( "password" );
+
+            return password;
+        }
+
+        return fromPassword;
+    }
+}

Added: maven/continuum/trunk/continuum-notifiers/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/pom.xml?rev=191140&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/pom.xml (added)
+++ maven/continuum/trunk/continuum-notifiers/pom.xml Fri Jun 17 05:24:22 2005
@@ -0,0 +1,28 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.continuum</groupId>
+    <artifactId>continuum-parent</artifactId>
+    <version>1.0</version>
+  </parent>
+  <artifactId>continuum-parent-notifiers</artifactId>
+  <name>Continuum Notifiers</name>
+  <packaging>pom</packaging>
+  <version>1.0-alpha-3-SNAPSHOT</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-api</artifactId>
+      <version>1.0-alpha-3-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>plexus</groupId>
+      <artifactId>plexus-notification</artifactId>
+      <version>1.0-alpha-4-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+  <modules>
+    <module>continuum-jabber-notifier</module>
+    <module>continuum-msn-notifier</module>
+  </modules>
+</project>



Mime
View raw message