Package org.apache.maven.continuum.xmlrpc.project

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary


    }

    public int buildGroup( int projectGroupId, int buildDefintionId )
        throws ContinuumException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefintionId );

        return 0;
    }
View Full Code Here


    }

    protected String getProjectGroupName( int projectGroupId )
        throws ContinuumException
    {
        ProjectGroupSummary pgs = getPGSummary( projectGroupId );
        return pgs.getName();
    }
View Full Code Here

    }

    public int buildGroup( int projectGroupId )
        throws ContinuumException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroup( projectGroupId );

        return 0;
    }
View Full Code Here

    }

    public int buildGroup( int projectGroupId, int buildDefintionId )
        throws ContinuumException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefintionId );

        return 0;
    }
View Full Code Here

        System.out.println( "Project Groups added." );
        System.out.println( "=====================" );
        int projectGroupId = 0;
        for ( Iterator i = result.getProjectGroups().iterator(); i.hasNext(); )
        {
            ProjectGroupSummary pg = (ProjectGroupSummary) i.next();
            projectGroupId = pg.getId();
            printProjectGroupSummary( client.getProjectGroupSummary( projectGroupId ) );
        }

        System.out.println();

        System.out.println( "Projects added." );
        System.out.println( "=====================" );
        for ( Iterator i = result.getProjects().iterator(); i.hasNext(); )
        {
            ProjectSummary p = (ProjectSummary) i.next();
            printProjectSummary( client.getProjectSummary( p.getId() ) );
        }

        System.out.println();

        System.out.println( "Waiting the end of the check out..." );

        ProjectSummary ps = (ProjectSummary) result.getProjects().get( 0 );

        while ( !"New".equals( client.getProjectStatusAsString( ps.getState() ) ) )
        {
            ps = client.refreshProjectSummary( ps );
            System.out.println( "State of " + ps.getName() + "(" + ps.getId() + "): " +
                                    client.getProjectStatusAsString( ps.getState() ) );
            Thread.sleep( 1000 );
        }

        System.out.println();

        BuildDefinition buildDef = new BuildDefinition();
        buildDef.setArguments( "A-Za-z0-9_./=,\": \\-" );
        buildDef.setSchedule( client.getSchedule( 1 ) );
        client.addBuildDefinitionToProjectGroup( 1, buildDef );

        ps = client.getProjectSummary( 1 );
        System.out.println( "Add the project to the build queue." );
        BuildTrigger trigger = new BuildTrigger();
        trigger.setTrigger( 1 );
        trigger.setTriggeredBy( "<script>alert('hahaha' )</script>" );
        client.buildProject( ps.getId(), trigger );
        while ( !"Building".equals( client.getProjectStatusAsString( ps.getState() ) ) )
        {
            ps = client.refreshProjectSummary( ps );
            Thread.sleep( 1000 );
        }

        System.out.println( "Building..." );
        String state = "unknown";
        while ( "Updating".equals( client.getProjectStatusAsString( ps.getState() ) ) || "Building".equals(
            client.getProjectStatusAsString( ps.getState() ) ) )
        {
            ps = client.refreshProjectSummary( ps );
            state = client.getProjectStatusAsString( ps.getState() );
            System.out.println( "State of " + ps.getName() + "(" + ps.getId() + "): " + state );
            Thread.sleep( 1000 );
        }
        System.out.println( "Build done with state=" + state + "." );

        System.out.println( "Build result." );
        System.out.println( "=====================" );
        printBuildResult( client.getLatestBuildResult( ps.getId() ) );

        System.out.println();

        System.out.println( "Build output." );
        System.out.println( "=====================" );
        System.out.println( client.getBuildOutput( ps.getId(), ps.getLatestBuildId() ) );

        System.out.println();

        System.out.println( "Removing build results." );
        System.out.println( "============================" );
        BuildResultSummary brs;
        List results = client.getBuildResultsForProject( ps.getId() );
        for ( Iterator i = results.iterator(); i.hasNext(); )
        {
            brs = (BuildResultSummary) i.next();
            System.out.print( "Removing build result (" + brs.getId() + ") - " );
            BuildResult br = client.getBuildResult( ps.getId(), brs.getId() );
            System.out.println( ( client.removeBuildResult( br ) == 0 ? "OK" : "Error" ) );
        }
        System.out.println( "Done." );

        System.out.println();

        System.out.println( "Projects list." );
        System.out.println( "=====================" );
        List projects = client.getProjects( projectGroupId );
        for ( Iterator i = projects.iterator(); i.hasNext(); )
        {
            ps = (ProjectSummary) i.next();
            printProjectSummary( ps );
            System.out.println();
        }

        System.out.println();

        System.out.println( "Remove all projects." );
        System.out.println( "=====================" );
        for ( Iterator i = projects.iterator(); i.hasNext(); )
        {
            ps = (ProjectSummary) i.next();
            System.out.println( "Removing '" + ps.getName() + "' - " + ps.getVersion() + " (" + ps.getId() + ")'..." );
            client.removeProject( ps.getId() );
            System.out.println( "Done." );
        }

        System.out.println();

        System.out.println( "Remove project group." );
        System.out.println( "=====================" );
        ProjectGroupSummary pg = client.getProjectGroupSummary( projectGroupId );
        System.out.println(
            "Removing Project Group '" + pg.getName() + "' - " + pg.getGroupId() + " (" + pg.getId() + ")'..." );
        client.removeProjectGroup( pg.getId() );
        System.out.println( "Done." );
        System.out.println();

        LocalRepository repository = new LocalRepository();
        repository.setLocation( "/home/marica/repository" );
View Full Code Here

    }

    protected String getProjectGroupName( int projectGroupId )
        throws ContinuumException
    {
        ProjectGroupSummary pgs = getPGSummary( projectGroupId );
        return pgs.getName();
    }
View Full Code Here

    }

    public int buildGroup( int projectGroupId )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroup( projectGroupId, new org.apache.continuum.utils.build.BuildTrigger(
            ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );

        return 0;
View Full Code Here

    }

    public int buildGroup( int projectGroupId, int buildDefinitionId )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId,
                                                        new org.apache.continuum.utils.build.BuildTrigger(
                                                            ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );
View Full Code Here

                one( continuum ).getProjectGroupByGroupId( groupId );
                will( returnValue( group ) );
            }
        } );

        ProjectGroupSummary group = continuumService.addProjectGroup( name, groupId, description );
        assertEquals( name, group.getName() );
        assertEquals( groupId, group.getGroupId() );
        assertEquals( description, group.getDescription() );

        context.assertIsSatisfied();
    }
View Full Code Here

                exactly( 3 ).of( continuum ).getProjectGroup( projectGroupId );
                onConsecutiveCalls( returnValue( group ), returnValue( group ), returnValue( newProjectGroup ) );
            }
        } );

        ProjectGroupSummary group = continuumService.addProjectGroup( "name", "groupId", "description" );
        group.setName( newName );
        group.setGroupId( newGroupId );
        group.setDescription( newDescription );

        continuumService.updateProjectGroup( group );

        context.assertIsSatisfied();
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

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.