Package org.apache.maven.continuum.model.project

Examples of org.apache.maven.continuum.model.project.Schedule


                storedDefinition.setBuildFresh( buildDefinition.isBuildFresh() );

                // special case of this is resolved in the resolveDefaultBuildDefinitionsForProjectGroup method
                storedDefinition.setDefaultForProject( buildDefinition.isDefaultForProject() );

                Schedule schedule;
                if ( buildDefinition.getSchedule() == null )
                {
                    try
                    {
                        schedule = scheduleDao.getScheduleByName( ConfigurationService.DEFAULT_SCHEDULE_NAME );
View Full Code Here


        Continuum continuum = (Continuum) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.CONTINUUM );

        ContinuumPurgeManager purgeManager = continuum.getPurgeManager();
       
        Schedule schedule = (Schedule) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.SCHEDULE );

        try
        {
            purgeManager.purge( schedule );
        }
        catch ( ContinuumPurgeManagerException e )
        {
            logger.error( "Error purging for job" + jobName + ".", e );
        }

        try
        {
            if ( schedule.getDelay() > 0 )
            {
                Thread.sleep( schedule.getDelay() * 1000 );
            }
        }
        catch ( InterruptedException e )
        {
        }
View Full Code Here

        logger.info( ">>>>>>>>>>>>>>>>>>>>> Executing build job (" + jobName + ")..." );

        Continuum continuum = (Continuum) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.CONTINUUM );

        Schedule schedule = (Schedule) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.SCHEDULE );

        try
        {
            continuum.buildProjects( schedule );
        }
        catch ( ContinuumException e )
        {
            logger.error( "Error building projects for job" + jobName + ".", e );
        }

        try
        {
            if ( schedule.getDelay() > 0 )
            {
                Thread.sleep( schedule.getDelay() * 1000 );
            }
        }
        catch ( InterruptedException e )
        {
        }
View Full Code Here

        assertNotNull( "Check project group reference matches", project.getProjectGroup() );
    }

    public void testAddSchedule()
    {
        Schedule newSchedule = createTestSchedule( "testAddSchedule", "testAddSchedule desc", 10, "cron test", false );
        Schedule copy = createTestSchedule( newSchedule );
        scheduleDao.addSchedule( newSchedule );
        copy.setId( newSchedule.getId() );

        List schedules = scheduleDao.getAllSchedulesByName();
        Schedule retrievedSchedule = (Schedule) schedules.get( schedules.size() - 1 );
        assertScheduleEquals( copy, retrievedSchedule );
    }
View Full Code Here

    }

    public void testEditSchedule()
        throws ContinuumStoreException
    {
        Schedule newSchedule = (Schedule) scheduleDao.getAllSchedulesByName().get( 0 );
        newSchedule.setName( "name1.1" );
        newSchedule.setDescription( "testEditSchedule updated description" );

        Schedule copy = createTestSchedule( newSchedule );
        copy.setId( newSchedule.getId() );
        scheduleDao.updateSchedule( newSchedule );

        Schedule retrievedSchedule = (Schedule) scheduleDao.getAllSchedulesByName().get( 0 );
        assertScheduleEquals( copy, retrievedSchedule );
    }
View Full Code Here

        assertScheduleEquals( copy, retrievedSchedule );
    }

    public void testRemoveSchedule()
    {
        Schedule schedule = (Schedule) scheduleDao.getAllSchedulesByName().get( 2 );

        // TODO: test if it has any attachments

        scheduleDao.removeSchedule( schedule );
View Full Code Here

        List schedules = scheduleDao.getAllSchedulesByName();

        assertEquals( "check item count", 3, schedules.size() );

        // check equality and order
        Schedule schedule = (Schedule) schedules.get( 0 );
        assertScheduleEquals( testSchedule1, schedule );
        schedule = (Schedule) schedules.get( 1 );
        assertScheduleEquals( testSchedule2, schedule );
        schedule = (Schedule) schedules.get( 2 );
        assertScheduleEquals( testSchedule3, schedule );
View Full Code Here

        throws ContinuumStoreException
    {
        Project project = projectDao.getProjectWithAllDetails( testProject1.getId() );

        Profile profile = profileDao.getProfile( testProfile1.getId() );
        Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );
        BuildDefinition buildDefinition = createTestBuildDefinition( "TABDTP arguments", "TABDTP buildFile",
                                                                     "TABDTP goals", profile, schedule, false, false );
        BuildDefinition copy = createTestBuildDefinition( buildDefinition );
        project.addBuildDefinition( buildDefinition );
        projectDao.updateProject( project );
View Full Code Here

    {
        ProjectGroup projectGroup =
            projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId() );

        Profile profile = profileDao.getProfile( testProfile1.getId() );
        Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );
        BuildDefinition buildDefinition = createTestBuildDefinition( "TABDTPG arguments", "TABDTPG buildFile",
                                                                     "TABDTPG goals", profile, schedule, false, false );
        BuildDefinition copy = createTestBuildDefinition( buildDefinition );
        projectGroup.addBuildDefinition( buildDefinition );
        projectGroupDao.updateProjectGroup( projectGroup );
View Full Code Here

    public void testAddRepositoryPurgeConfiguration()
        throws Exception
    {
        LocalRepository repository = localRepositoryDao.getLocalRepository( testLocalRepository3.getId() );
        Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );

        RepositoryPurgeConfiguration repoPurge =
            createTestRepositoryPurgeConfiguration( true, 2, 100, false, schedule, true, repository );

        RepositoryPurgeConfiguration copy = createTestRepositoryPurgeConfiguration( repoPurge );
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.model.project.Schedule

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.