Package org.apache.continuum.model.project

Examples of org.apache.continuum.model.project.ProjectScmRoot


    {
        List<Map<String, Object>> buildContext = new ArrayList<Map<String, Object>>();

        try
        {
            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( scmRootId );

            List<Project> projects = projectDao.getProjectsWithDependenciesByGroupId( scmRoot.getProjectGroup().getId() );
            List<Project> sortedProjects = ProjectSorter.getSortedProjects( projects, null );

            for ( Project project : sortedProjects )
            {
                if ( !projectsAndBuildDefinitions.containsKey( project.getId() ) )
View Full Code Here


    private void createResult( PrepareBuildProjectsTask task, String error )
        throws TaskExecutionException
    {
        try
        {
            ProjectScmRoot scmRoot =
                projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( task.getProjectGroupId(),
                                                                                    task.getScmRootAddress() );

            if ( scmRoot.getState() == ContinuumProjectState.UPDATING )
            {
                scmRoot.setState( ContinuumProjectState.ERROR );
                scmRoot.setError( error );
                projectScmRootDao.updateProjectScmRoot( scmRoot );
            }
            else
            {
                Map<Integer, Integer> map = task.getProjectsBuildDefinitionsMap();
View Full Code Here

                        prepareBuildTaskQueueExecutor.getCurrentTask() != null )
        {
            Thread.sleep( 10 );
        }

        ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
        assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );

        File workingDir = configurationService.getWorkingDirectory();

        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );
View Full Code Here

                        prepareBuildTaskQueueExecutor.getCurrentTask() != null )
        {
            Thread.sleep( 10 );
        }

        ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
        assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );

        File workingDir = configurationService.getWorkingDirectory();

        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );
View Full Code Here

        String scmRootUrl = getScmRootUrl( projectGroup );

        assertNotNull( scmRootUrl );

        ProjectScmRoot scmRoot = getProjectScmRoot( projectGroup, scmRootUrl );

        assertNotNull( scmRoot );

        buildDefinition = (BuildDefinition) projectGroup.getBuildDefinitions().get( 0 );

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();

        Project rootProject = null;

        List<Project> projects = (List<Project>) projectGroup.getProjects();

        for ( Project project : projects )
        {
            assertFalse( project.getId() == 0 );
           
            map.put( project.getId(), buildDefinition.getId() );

            if ( rootProject == null || rootProject.getId() > project.getId() )
            {
                rootProject = project;
            }
        }

        assertEquals( 3, map.size() );
        PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( map, 1,
                                                                      projectGroupId, projectGroup.getName(),
                                                                      scmRoot.getScmRootAddress(), scmRoot.getId() );

        return task;
    }
View Full Code Here

        if ( StringUtils.isEmpty( url ) )
        {
            return null;
        }

        ProjectScmRoot scmRoot =
            projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( pg.getId(), url );

        if ( scmRoot != null )
        {
            return scmRoot;
        }

        ProjectScmRoot projectScmRoot = new ProjectScmRoot();

        projectScmRoot.setProjectGroup( pg );

        projectScmRoot.setScmRootAddress( url );

        projectScmRoot.setState( ContinuumProjectState.ERROR );

        return projectScmRootDao.addProjectScmRoot( projectScmRoot );
    }
View Full Code Here

        int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
        String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );
   
        try
        {
            ProjectScmRoot scmRoot =
                projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroupId, scmRootAddress );
   
            String error = ContinuumBuildConstant.getScmError( context );
   
            if ( StringUtils.isEmpty( error ) )
            {
                scmRoot.setState( ContinuumProjectState.UPDATED );
            }
            else
            {
                scmRoot.setState( ContinuumProjectState.ERROR );
                scmRoot.setError( error );
            }
   
            projectScmRootDao.updateProjectScmRoot( scmRoot );
   
            notifierDispatcher.prepareBuildComplete( scmRoot );
View Full Code Here

        try
        {
            int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
            String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );
   
            ProjectScmRoot scmRoot =
                projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroupId, scmRootAddress );
            scmRoot.setOldState( scmRoot.getState() );
            scmRoot.setState( ContinuumProjectState.UPDATING );
            projectScmRootDao.updateProjectScmRoot( scmRoot );
        }
        catch ( ContinuumStoreException e )
        {
            log.error( "Error while updating project scm root's state", e );
View Full Code Here

                        prepareBuildTaskQueueExecutor.getCurrentTask() != null )
        {
            Thread.sleep( 10 );
        }

        ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
        assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );

        File workingDir = configurationService.getWorkingDirectory();

        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );
View Full Code Here

                        prepareBuildTaskQueueExecutor.getCurrentTask() != null )
        {
            Thread.sleep( 10 );
        }

        ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
        assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );

        File workingDir = configurationService.getWorkingDirectory();

        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );
View Full Code Here

TOP

Related Classes of org.apache.continuum.model.project.ProjectScmRoot

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.