Package org.apache.maven.continuum.buildqueue

Examples of org.apache.maven.continuum.buildqueue.BuildProjectTask


        String buildDefinitionLabel = buildDefinition.getDescription();
        if ( StringUtils.isEmpty( buildDefinitionLabel ) )
        {
            buildDefinitionLabel = buildDefinition.getGoals();
        }
        BuildProjectTask buildProjectTask =
            new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName, buildDefinitionLabel );
        return this.buildQueue.remove( buildProjectTask );
    }
View Full Code Here


            }

            getLogger().info( "Enqueuing '" + project.getName() + "' with build definition '" + buildDefinitionLabel +
                "' - id=" + buildDefinitionId + ")." );

            BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinitionId, trigger, project
                .getName(), buildDefinitionLabel );

            task.setMaxExecutionTime( buildDefinitionDao.getBuildDefinition( buildDefinitionId ).getSchedule()
                .getMaxJobExecutionTime() * 1000 );

            buildQueue.put( task );
        }
        catch ( ContinuumStoreException e )
View Full Code Here

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

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        BuildProjectTask buildProjectTask = (BuildProjectTask) task;

        controller.build( buildProjectTask.getProjectId(), buildProjectTask.getBuildDefinitionId(), buildProjectTask
            .getTrigger() );
    }
View Full Code Here

        String buildDefinitionLabel = buildDefinition.getDescription();
        if ( StringUtils.isEmpty( buildDefinitionLabel ) )
        {
            buildDefinitionLabel = buildDefinition.getGoals();
        }
        BuildProjectTask buildProjectTask =
            new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName, buildDefinitionLabel );
        return this.buildQueue.remove( buildProjectTask );
    }
View Full Code Here

            }

            getLogger().info( "Enqueuing '" + project.getName() + "' with build definition '" + buildDefinitionLabel +
                "' - id=" + buildDefinitionId + ")." );

            BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinitionId, trigger, project
                .getName(), buildDefinitionLabel );

            task.setMaxExecutionTime( buildDefinitionDao.getBuildDefinition( buildDefinitionId ).getSchedule()
                .getMaxJobExecutionTime() * 1000 );

            buildQueue.put( task );
        }
        catch ( ContinuumStoreException e )
View Full Code Here

    }

    public void testManualCancellation()
        throws Exception
    {
        BuildProjectTask task = runTimeoutProject( 0 );

        assertFalse( "Build completed", getTestFile( "src/test-projects/timeout/target/TEST-COMPLETED" ).exists() );

        long taskStartTime = System.currentTimeMillis();
View Full Code Here

     * @throws Exception
     */
    private BuildProjectTask runTimeoutProject( int maxRunTime )
        throws Exception
    {
        BuildProjectTask task = createTask( maxRunTime );

        FileUtils.forceDelete( getTestFile( "src/test-projects/timeout/target/TEST-STARTED" ) );
        FileUtils.forceDelete( getTestFile( "src/test-projects/timeout/target/TEST-COMPLETED" ) );

        System.err.println( "Queueing build" );
View Full Code Here

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

        // projectGroup = continuumStore.addProjectGroup( projectGroup );

        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), 0, project.getName(),
                                                      buildDefinition.getDescription() );

        task.setMaxExecutionTime( maxRunTime );

        return task;
    }
View Full Code Here

    }

    public void testManualCancellation()
        throws Exception
    {
        BuildProjectTask task = runTimeoutProject( 0 );

        assertFalse( "Build completed", getTestFile( "src/test-projects/timeout/target/TEST-COMPLETED" ).exists() );

        long taskStartTime = System.currentTimeMillis();
View Full Code Here

     * @throws Exception
     */
    private BuildProjectTask runTimeoutProject( int maxRunTime )
        throws Exception
    {
        BuildProjectTask task = createTask( maxRunTime );

        FileUtils.forceDelete( getTestFile( "src/test-projects/timeout/target/TEST-STARTED" ) );
        FileUtils.forceDelete( getTestFile( "src/test-projects/timeout/target/TEST-COMPLETED" ) );

        System.err.println( "Queueing build" );
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.buildqueue.BuildProjectTask

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.