Package org.apache.maven.continuum.notification

Examples of org.apache.maven.continuum.notification.NotificationException


            return;
        }
        catch ( Exception e )
        {
            throw new NotificationException( "Error while generating mail contents.", e );
        }

        // ----------------------------------------------------------------------
        // Send the mail
        // ----------------------------------------------------------------------

        String subject;
        try
        {
            subject = generateSubject( projectScmRoot );
        }
        catch ( Exception e )
        {
            throw new NotificationException( "Error while generating mail subject.", e );
        }

        sendMessage( projectScmRoot, notifiers, subject, content, messageContext );
    }
View Full Code Here


                javaMailSender.send( message );
            }
        }
        catch ( AddressException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
        catch ( MessagingException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
        catch ( UnsupportedEncodingException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
    }
View Full Code Here

                javaMailSender.send( message );
            }
        }
        catch ( AddressException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
        catch ( MessagingException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
        catch ( UnsupportedEncodingException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
    }
View Full Code Here

        {
            message = generateMessage( project, build );
        }
        catch ( ContinuumException e )
        {
            throw new NotificationException( "Can't generate the message.", e );
        }

        msnClient.setLogin( getUsername( notifier.getConfiguration() ) );

        msnClient.setPassword( getPassword( notifier.getConfiguration() ) );

        try
        {
            msnClient.login();

            if ( notifier.getConfiguration() != null &&
                StringUtils.isNotEmpty( (String) notifier.getConfiguration().get( ADDRESS_FIELD ) ) )
            {
                String address = (String) notifier.getConfiguration().get( ADDRESS_FIELD );
                String[] recipients = StringUtils.split( address, "," );
                for ( String recipient : recipients )
                {
                    msnClient.sendMessage( recipient, message );
                }
            }
        }
        catch ( MsnException e )
        {
            throw new NotificationException( "Exception while sending message.", e );
        }
        finally
        {
            try
            {
View Full Code Here

                }
            }
        }
        catch ( ContinuumException e )
        {
            throw new NotificationException( "Error while notifiying.", e );
        }
    }
View Full Code Here

                                                           fullName, channel, isSsl );
            ircConnection.doPrivmsg( channel, generateMessage( project, build ) );
        }
        catch ( IOException e )
        {
            throw new NotificationException( "Exception while checkConnection to irc ." + host, e );
        }
    }
View Full Code Here

                }
            }
        }
        catch ( ContinuumException e )
        {
            throw new NotificationException( "Error while notifiying.", e );
        }
    }
View Full Code Here

            return;
        }
        catch ( Exception e )
        {
            throw new NotificationException( "Error while generating mail contents.", e );
        }

        // ----------------------------------------------------------------------
        // Send the mail
        // ----------------------------------------------------------------------

        String subject;
        try
        {
            subject = generateSubject( project, build );
        }
        catch ( Exception e )
        {
            throw new NotificationException( "Error while generating mail subject.", e );
        }

        sendMessage( project, notifiers, subject, content, messageContext );
    }
View Full Code Here

            javaMailSender.send( message );
            //mailSender.send( message );
        }
        catch ( AddressException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
        catch ( MessagingException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
        catch ( UnsupportedEncodingException ex )
        {
            throw new NotificationException( "Exception while sending message.", ex );
        }
    }
View Full Code Here

        {
            message = generateMessage( project, build );
        }
        catch ( ContinuumException e )
        {
            throw new NotificationException( "Can't generate the message.", e );
        }

        jabberClient.setHost( getHost( notifier.getConfiguration() ) );

        jabberClient.setPort( getPort( notifier.getConfiguration() ) );

        jabberClient.setUser( getUsername( notifier.getConfiguration() ) );

        jabberClient.setPassword( getPassword( notifier.getConfiguration() ) );

        jabberClient.setImDomainName( getImDomainName( notifier.getConfiguration() ) );

        jabberClient.setSslConnection( isSslConnection( notifier.getConfiguration() ) );

        try
        {
            jabberClient.connect();

            jabberClient.logon();

            if ( notifier.getConfiguration() != null &&
                StringUtils.isNotEmpty( (String) notifier.getConfiguration().get( ADDRESS_FIELD ) ) )
            {
                String address = (String) notifier.getConfiguration().get( ADDRESS_FIELD );
                String[] recipients = StringUtils.split( address, "," );
                for ( String recipient : recipients )
                {
                    if ( isGroup( notifier.getConfiguration() ) )
                    {
                        jabberClient.sendMessageToGroup( recipient, message );
                    }
                    else
                    {
                        jabberClient.sendMessageToUser( recipient, message );
                    }
                }
            }
        }
        catch ( JabberClientException e )
        {
            throw new NotificationException( "Exception while sending message.", e );
        }
        finally
        {
            try
            {
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.notification.NotificationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.