Package org.apache.maven.continuum.notification

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


    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, BuildDefinition buildDef,
                                                       String buildOutput, String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        context.setBuildDefinition( buildDef );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here


    // ----------------------------------------------------------------------

    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, String buildOutput, String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here

    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, BuildDefinition buildDef,
                                                       String buildOutput, String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        context.setBuildDefinition( buildDef );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here

    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, String buildOutput,
                                                       String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here

    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, String buildOutput,
                                                       String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here

    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, BuildDefinition buildDef,
                                                       String buildOutput, String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        context.setBuildDefinition( buildDef );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here

        build.setExitCode( 0 );

        BuildDefinition buildDefinition = new BuildDefinition();
        buildDefinition.setBuildFile( "pom.xml" );

        context = new MessageContext();
        context.setProject( project );
        context.setBuildResult( build );
        context.setBuildDefinition( buildDefinition );

        String basedir = System.getProperty( "basedir" );
View Full Code Here

        Project project = makeStubProject( "Test Project" );
        project.setGroupId( "com.example" );

        BuildResult build = makeBuild( ContinuumProjectState.ERROR );

        MessageContext context = new MessageContext();
        context.setProject( project );
        context.setBuildResult( build );

        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();

        ProjectNotifier pn1 = new ProjectNotifier();
        pn1.setType( "mail" );
        Map<String, String> config1 = new HashMap<String, String>();
        config1.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@example.com" );
        pn1.setConfiguration( config1 );
        projectNotifiers.add( pn1 );

        ProjectNotifier pn2 = new ProjectNotifier();
        pn2.setType( "mail" );
        Map<String, String> config2 = new HashMap<String, String>();
        config2.put( MailContinuumNotifier.ADDRESS_FIELD, "bar@example.com" );
        pn2.setConfiguration( config2 );
        projectNotifiers.add( pn2 );

        context.setNotifier( projectNotifiers );

        Notifier notifier = (Notifier) lookup( Notifier.class.getName(), "mail" );

        ( (MailContinuumNotifier) notifier ).setBuildHost( "foo.bar.com" );
View Full Code Here

    // ----------------------------------------------------------------------

    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, String buildOutput, String toOverride )
        throws Exception
    {
        MessageContext context = new MessageContext();

        context.setProject( project );

        context.setBuildResult( build );

        ProjectNotifier projectNotifier = new ProjectNotifier();
        projectNotifier.setType( "mail" );
        Map<String, String> config = new HashMap<String, String>();
        config.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@bar" );
        projectNotifier.setConfiguration( config );
        List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
        projectNotifiers.add( projectNotifier );
        context.setNotifier( projectNotifiers );

        //context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT, buildOutput );

        //context.put( "buildHost", "foo.bar.com" );
View Full Code Here

TOP

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

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.