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

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


        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


        return buildQueues;
    }

    private Schedule getSchedule( int id, int start, int end )
    {
        Schedule schedule = new Schedule();
        schedule.setId( id );
        schedule.setName( "DEFAULT_SCHEDULE" );
        schedule.setCronExpression( "0 0 * * * ?" );
        schedule.setDelay( 100 );
        schedule.setMaxJobExecutionTime( 10000 );
        schedule.setBuildQueues( getBuildQueues( start, end ) );

        return schedule;
    }
View Full Code Here

            Collections.synchronizedMap( new HashMap<Integer, OverallBuildQueue>() );
        overallBuildQueues.put( 1, overallBuildQueue );

        buildsManager.setOverallBuildQueues( overallBuildQueues );

        Schedule schedule = new Schedule();
        schedule.setId( 1 );
        schedule.setName( "DEFAULT_SCHEDULE" );
        schedule.setCronExpression( "0 0 * * * ?" );
        schedule.setDelay( 100 );
        schedule.setMaxJobExecutionTime( 10000 );

        BuildDefinition buildDef = new BuildDefinition();
        buildDef.setId( 1 );
        buildDef.setSchedule( schedule );

View Full Code Here

                storedDefinition.setUpdatePolicy( buildDefinition.getUpdatePolicy() );

                // 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

                    }
                    if ( buildDefinition.getSchedule() == null )
                    {
                        try
                        {
                            Schedule schedule =
                                scheduleDao.getScheduleByName( ConfigurationService.DEFAULT_SCHEDULE_NAME );

                            buildDefinition.setSchedule( schedule );
                        }
                        catch ( ContinuumStoreException e )
View Full Code Here

    }

    public String saveBuildDefinition()
        throws Exception
    {
        Schedule schedule = null;
        if ( buildDefinition.getProfile() != null )
        {
            Profile profile = getContinuum().getProfileService().getProfile( buildDefinition.getProfile().getId() );
            if ( profile != null )
            {
View Full Code Here

    public Schedule getDefaultSchedule()
        throws ContinuumStoreException, ConfigurationLoadingException, ContinuumConfigurationException,
        BuildQueueServiceException
    {
        // Schedule
        Schedule defaultSchedule = scheduleDao.getScheduleByName( DEFAULT_SCHEDULE_NAME );

        if ( defaultSchedule == null )
        {
            defaultSchedule = createDefaultSchedule();
View Full Code Here

        BuildQueueServiceException
    {

        log.info( "create Default Schedule" );

        Schedule schedule = new Schedule();

        schedule.setName( DEFAULT_SCHEDULE_NAME );

        //It shouldn't be possible
        if ( systemConf == null )
        {
            this.reload();
        }

        schedule.setDescription( systemConf.getDefaultScheduleDescription() );

        schedule.setCronExpression( systemConf.getDefaultScheduleCronExpression() );

        schedule.setActive( true );

        BuildQueue buildQueue = getDefaultBuildQueue();

        schedule.addBuildQueue( buildQueue );

        return schedule;
    }
View Full Code Here

    }

    public String saveBuildDefinition()
        throws Exception
    {
        Schedule schedule = null;

        // need to escape xml to prevent xss attacks
        buildDefinition.setDescription( StringEscapeUtils.escapeXml( StringEscapeUtils.unescapeXml(
            buildDefinition.getDescription() ) ) );
View Full Code Here

    }

    public void addSchedule( Schedule schedule )
        throws ContinuumException
    {
        Schedule s;

        s = getScheduleByName( schedule.getName() );

        if ( s != null )
        {
            throw logAndCreateException( "Can't create schedule. A schedule with the same name already exists.", null );
        }

        s = scheduleDao.addSchedule( schedule );

        try
        {
            schedulesActivator.activateSchedule( s, this );
        }
        catch ( SchedulesActivationException e )
        {
            throw new ContinuumException( "Error activating schedule " + s.getName() + ".", e );
        }
    }
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.