Examples of BuildDefinition


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

        {
            addActionError( getText( "unable to get schedule" ) );
            throw new ContinuumActionException( "unable to get schedule" );
        }

        BuildDefinition buildDefinition = new BuildDefinition();

        if ( buildDefinitionId != 0 )
        {
            buildDefinition.setId( buildDefinitionId );
        }
        buildDefinition.setGoals( goals );
        buildDefinition.setArguments( arguments );
        buildDefinition.setBuildFile( buildFile );
        buildDefinition.setBuildFresh( buildFresh );
        buildDefinition.setDefaultForProject( defaultBuildDefinition );
        buildDefinition.setSchedule( schedule );
        if ( profileId != -1 )
        {
            Profile profile = getContinuum().getProfileService().getProfile( profileId );
            if ( profile != null )
            {
                buildDefinition.setProfile( profile );
            }
        }
        buildDefinition.setDescription( description );
        buildDefinition.setType( buildDefinitionType );
        buildDefinition.setAlwaysBuild( alwaysBuild );
        buildDefinition.setUpdatePolicy( updatePolicy );
        return buildDefinition;
    }
View Full Code Here

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

        throws NotificationException
    {
        Project project = context.getProject();

        List<ProjectNotifier> notifiers = context.getNotifiers();
        BuildDefinition buildDefinition = context.getBuildDefinition();
        BuildResult build = context.getBuildResult();
        ProjectScmRoot projectScmRoot = context.getProjectScmRoot();

        boolean isPrepareBuildComplete =
            messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_PREPARE_BUILD_COMPLETE );
View Full Code Here

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

        try
        {
            ContinuumAgentBuildExecutor buildExecutor =
                buildAgentBuildExecutorManager.getBuildExecutor( context.getExecutorId() );

            BuildDefinition buildDefinition = BuildContextToBuildDefinition.getBuildDefinition( context );

            File workingDirectory = buildAgentConfigurationService.getWorkingDirectory( context.getProjectId() );

            MavenProject project = buildExecutor.getMavenProject( workingDirectory, buildDefinition );
View Full Code Here

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

    public BuildDefinition getDefaultBuildDefinition( int projectId )
        throws ContinuumStoreException
    {
        //TODO: Move this method to a service class
        BuildDefinition bd = null;

        try
        {
            bd = getDefaultBuildDefinitionForProject( projectId );
        }
View Full Code Here

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

        {
            try
            {
                for ( BuildContext buildContext : buildContexts )
                {
                    BuildDefinition buildDef = BuildContextToBuildDefinition.getBuildDefinition( buildContext );

                    log.info( "Check scm root state" );
                    if ( !checkProjectScmRoot( context ) )
                    {
                        break;
                    }

                    log.info( "Starting prepare build" );
                    startPrepareBuild( buildContext );

                    log.info( "Initializing prepare build" );
                    initializeActionContext( buildContext );

                    try
                    {
                        if ( buildDef.isBuildFresh() )
                        {
                            log.info( "Clean up working directory" );
                            cleanWorkingDirectory( buildContext );
                        }

                        log.info( "Updating working directory" );
                        updateWorkingDirectory( buildContext );

                        log.info( "Merging SCM results" );
                        //CONTINUUM-1393
                        if ( !buildDef.isBuildFresh() )
                        {
                            mergeScmResults( buildContext );
                        }
                    }
                    finally
View Full Code Here

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

            List<BuildDefinition> buildDefs = new ArrayList<BuildDefinition>();
            Iterator<BuildDefinition> it = pg.getBuildDefinitions().listIterator();
            boolean template = false;
            while ( it.hasNext() )
            {
                BuildDefinition bd = it.next();
                if ( bd.isTemplate() )
                {
                    template = true;
                }
                else
                {
View Full Code Here

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

    {
        Project project = context.getProject();

        List<ProjectNotifier> notifiers = context.getNotifiers();

        BuildDefinition buildDefinition = context.getBuildDefinition();

        BuildResult build = context.getBuildResult();

        ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
View Full Code Here

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

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

        BuildDefinition newBuildDefinition = project.getBuildDefinitions().get( 0 );
        newBuildDefinition.setBuildFresh( true );
        new BuildDefinition().setDefaultForProject( true );
        String arguments = "arguments1.1";
        newBuildDefinition.setArguments( arguments );
        BuildDefinition copy = createTestBuildDefinition( newBuildDefinition );
        buildDefinitionDao.storeBuildDefinition( newBuildDefinition );

        project = projectDao.getProjectWithAllDetails( testProject1.getId() );
        assertEquals( "check # build defs", 2, project.getBuildDefinitions().size() );
        BuildDefinition retrievedBuildDefinition = project.getBuildDefinitions().get( 0 );
       
        assertBuildDefinitionEquals( copy, retrievedBuildDefinition );
        assertScheduleEquals( testSchedule1, retrievedBuildDefinition.getSchedule() );
        assertProfileEquals( testProfile2, retrievedBuildDefinition.getProfile() );
    }
View Full Code Here

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

    public void testDeleteBuildDefinition()
        throws ContinuumStoreException
    {
        Project project = projectDao.getProjectWithAllDetails( testProject1.getId() );
        BuildDefinition buildDefinition = project.getBuildDefinitions().get( 1 );
        project.getBuildDefinitions().remove( 0 );
        projectDao.updateProject( project );

        project = projectDao.getProjectWithAllDetails( testProject1.getId() );
        assertEquals( "check size is now 1", 1, project.getBuildDefinitions().size() );
        BuildDefinition retrievedBuildDefinition = project.getBuildDefinitions().get( 0 );
        assertBuildDefinitionEquals( buildDefinition, retrievedBuildDefinition );
        assertScheduleEquals( testSchedule2, retrievedBuildDefinition.getSchedule() );
        assertProfileEquals( testProfile2, retrievedBuildDefinition.getProfile() );

        // !! These actually aren't happening !!
        // TODO: test the def was physically deleted
        // TODO: test the schedule/profile was NOT physically deleted
    }
View Full Code Here

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

        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 );

        projectGroup = projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId() );
        assertEquals( "check # build defs", 2, projectGroup.getBuildDefinitions().size() );
        BuildDefinition retrievedBuildDefinition = projectGroup.getBuildDefinitions().get( 1 );
        assertBuildDefinitionEquals( copy, retrievedBuildDefinition );
        assertScheduleEquals( testSchedule1, retrievedBuildDefinition.getSchedule() );
        assertProfileEquals( testProfile1, retrievedBuildDefinition.getProfile() );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.