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

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


    public BuildDefinitionTemplate getBuildDefinitionTemplate()
    {
        if ( buildDefinitionTemplate == null )
        {
            this.buildDefinitionTemplate = new BuildDefinitionTemplate();
        }
        return buildDefinitionTemplate;
    }
View Full Code Here


                group.setLocalRepository( localRepository );

                group = projectGroupDao.addProjectGroup( group );

                BuildDefinitionTemplate bdt = buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate();

                buildDefinitionService.addBuildDefinitionTemplateToProjectGroup( group.getId(), bdt );
            }
        }
    }
View Full Code Here

                                                                      "default" );
        bd = bds.addBuildDefinition( bd );

        assertEquals( 5, bds.getAllBuildDefinitions().size() );

        bdt = new BuildDefinitionTemplate();
        bdt.setName( "bdt foo" );

        bdt = bds.addBuildDefinitionTemplate( bdt );

        bdt = bds.addBuildDefinitionInTemplate( bdt, bd, false );
View Full Code Here

        executeAction( "store-project", context );

        try
        {
            BuildDefinitionTemplate bdt;

            if ( executorId.equalsIgnoreCase( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR ) )
            {
                if ( buildDefinitionTemplateId <= 0 )
                {
                    bdt = buildDefinitionService.getDefaultAntBuildDefinitionTemplate();
                }
                else
                {
                    bdt = buildDefinitionService.getBuildDefinitionTemplate( buildDefinitionTemplateId );
                }
            }
            else
            {
                //shell default
                if ( buildDefinitionTemplateId <= 0 )
                {
                    bdt = buildDefinitionService.getDefaultShellBuildDefinitionTemplate();
                }
                else
                {
                    bdt = buildDefinitionService.getBuildDefinitionTemplate( buildDefinitionTemplateId );
                }
            }

            buildDefinitionService.addTemplateInProject( bdt.getId(), getProject( AbstractContinuumAction.getProjectId(
                context ) ) );
        }
        catch ( BuildDefinitionServiceException e )
        {
            throw new ContinuumException( e.getMessage(), e );
View Full Code Here

        // olamy  : read again the project to have values because store.updateProjectGroup( projectGroup );
        // remove object data -> we don't display the project name in the build queue
        AbstractContinuumAction.setProject( context, projectDao.getProject( project.getId() ) );

        BuildDefinition defaultBuildDefinition = null;
        BuildDefinitionTemplate template = null;
        if ( projectBuilderId.equals( MavenTwoContinuumProjectBuilder.ID ) )
        {
            template = buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate();

            if ( template != null && template.getBuildDefinitions().size() > 0 )
            {
                defaultBuildDefinition = template.getBuildDefinitions().get( 0 );
            }
        }
        else if ( projectBuilderId.equals( MavenOneContinuumProjectBuilder.ID ) )
        {
            template = buildDefinitionService.getDefaultMavenOneBuildDefinitionTemplate();

            if ( template != null && template.getBuildDefinitions().size() > 0 )
            {
                defaultBuildDefinition = template.getBuildDefinitions().get( 0 );
            }
        }

        if ( defaultBuildDefinition == null )
        {
View Full Code Here

        bd.setBuildFile( "pom.xml" );

        bd.setType( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );

        BuildDefinitionTemplate bdt = new BuildDefinitionTemplate();
        bdt.addBuildDefinition( bd );
        return bdt;
    }
View Full Code Here

        ContinuumProjectBuildingResult result;

        try
        {
            BuildDefinitionTemplate buildDefinitionTemplate = getBuildDefinitionTemplate( context );
            if ( buildDefinitionTemplate == null )
            {
                buildDefinitionTemplate = projectBuilder.getDefaultBuildDefinitionTemplate();
            }
            if ( !curl.startsWith( "http" ) )
View Full Code Here

    }

    public BuildDefinitionTemplate getDefaultAntBuildDefinitionTemplate()
        throws BuildDefinitionServiceException
    {
        BuildDefinitionTemplate template = getContinuumDefaultWithType(
            ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR );
        if ( template != null )
        {
            return template;
        }
        log.info( "create default AntBuildDefinitionTemplate" );
        template = new BuildDefinitionTemplate();
        template.setContinuumDefault( true );
        template.setName( "Default Ant Template" );
        template.setType( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR );

        template = addBuildDefinitionTemplate( template );

        BuildDefinition bd = new BuildDefinition();
View Full Code Here

    }

    public BuildDefinitionTemplate getDefaultMavenOneBuildDefinitionTemplate()
        throws BuildDefinitionServiceException
    {
        BuildDefinitionTemplate template = getContinuumDefaultWithType(
            ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR );
        if ( template != null )
        {
            log.debug( "found default maven template " + template.getType() );
            return template;
        }
        log.info( "create default MavenOneBuildDefinitionTemplate" );
        template = new BuildDefinitionTemplate();
        template.setContinuumDefault( true );
        template.setName( "Default Maven 1 Template" );
        template.setType( ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR );

        template = addBuildDefinitionTemplate( template );

        BuildDefinition bd = new BuildDefinition();
View Full Code Here

    }

    public BuildDefinitionTemplate getDefaultMavenTwoBuildDefinitionTemplate()
        throws BuildDefinitionServiceException
    {
        BuildDefinitionTemplate template = getContinuumDefaultWithType(
            ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );
        if ( template != null )
        {
            return template;
        }
        log.info( "create default MavenTwoBuildDefinitionTemplate" );
        template = new BuildDefinitionTemplate();
        template.setContinuumDefault( true );
        template.setName( "Default Maven Template" );
        template.setType( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR );

        template = addBuildDefinitionTemplate( template );

        BuildDefinition bd = new BuildDefinition();
View Full Code Here

TOP

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

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.