Examples of Installation


Examples of org.apache.maven.continuum.model.system.Installation

    }

    public String addInstallation()
        throws Exception
    {
        Installation installation = installationService.getInstallation( this.getInstallationId() );
        if ( installation != null )
        {
            profileService.addInstallationInProfile( profile, installation );
            // read again
            this.profile = profileService.getProfile( profile.getId() );
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

    public String removeInstallation()
        throws Exception
    {

        Installation installation = installationService.getInstallation( this.getInstallationId() );
        profileService.removeInstallationFromProfile( profile, installation );
        this.profile = profileService.getProfile( profile.getId() );
        return SUCCESS;
    }
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

        String javaHome = getJavaHomeValue( buildDefinition );
        if ( !StringUtils.isEmpty( javaHome ) )
        {
            envVars.put( getInstallationService().getEnvVar( InstallationService.JDK_TYPE ), javaHome );
        }
        Installation builder = profile.getBuilder();
        if ( builder != null )
        {
            envVars.put( getInstallationService().getEnvVar( InstallationService.MAVEN1_TYPE ), builder.getVarValue() );
        }
        envVars.putAll( getEnvironmentVariables( buildDefinition ) );
        return envVars;

    }
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

                List<Map<String, String>> installationsList = client.getAvailableInstallations();

                for ( Map context : installationsList )
                {
                    Installation installation = new Installation();
                    installation.setName( ContinuumBuildConstant.getInstallationName( context ) );
                    installation.setType( ContinuumBuildConstant.getInstallationType( context ) );
                    installation.setVarName( ContinuumBuildConstant.getInstallationVarName( context ) );
                    installation.setVarValue( ContinuumBuildConstant.getInstallationVarValue( context ) );
                    installations.add( installation );
                }
            }

            // call reload in case we disable the build agent
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

        String javaHome = getJavaHomeValue( buildDefinition );
        if ( !StringUtils.isEmpty( javaHome ) )
        {
            envVars.put( getInstallationService().getEnvVar( InstallationService.JDK_TYPE ), javaHome );
        }
        Installation builder = profile.getBuilder();
        if ( builder != null )
        {
            envVars.put( getInstallationService().getEnvVar( InstallationService.MAVEN2_TYPE ), builder.getVarValue() );
        }
        envVars.putAll( getEnvironmentVariables( buildDefinition ) );
        return envVars;

    }
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

        String javaHome = getJavaHomeValue( buildDefinition );
        if ( !StringUtils.isEmpty( javaHome ) )
        {
            envVars.put( getInstallationService().getEnvVar( InstallationService.JDK_TYPE ), javaHome );
        }
        Installation builder = profile.getBuilder();
        if ( builder != null )
        {
            envVars.put( builder.getVarName(), builder.getVarValue() );
        }
        envVars.putAll( getEnvironmentVariables( buildDefinition ) );
        return envVars;

    }
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

    {
        super.setUp();
        DaoUtils daoUtils = (DaoUtils) lookup( DaoUtils.class.getName() );
        daoUtils.eraseDatabase();

        jdk1 = new Installation();
        jdk1.setType( InstallationService.JDK_TYPE );
        jdk1.setVarValue( "/foo/bar" );
        jdk1.setName( jdk1Name );
        jdk1 = getInstallationService().add( jdk1 );

        jdk2 = new Installation();
        jdk2.setType( InstallationService.JDK_TYPE );
        jdk2.setVarValue( "/foo/bar/zloug" );
        jdk2.setName( jdk2Name );
        jdk2 = getInstallationService().add( jdk2 );

        mvn205 = new Installation();
        mvn205.setType( InstallationService.MAVEN2_TYPE );
        mvn205.setVarValue( "/users/maven-2.0.5" );
        mvn205.setName( mvn205Name );
        mvn205 = getInstallationService().add( mvn205 );

        mvn206 = new Installation();
        mvn206.setType( InstallationService.MAVEN2_TYPE );
        mvn206.setVarValue( "/users/maven-2.0.6" );
        mvn206.setName( mvn206Name );
        mvn206 = getInstallationService().add( mvn206 );

        jdk1mvn205 = new Profile();
        jdk1mvn205.setJdk( jdk1 );
        jdk1mvn205.setBuilder( mvn205 );
        jdk1mvn205.setName( jdk1mvn205Name );
        getProfileService().addProfile( jdk1mvn205 );

        jdk2mvn206 = new Profile();
        jdk2mvn206.setJdk( jdk2 );
        jdk2mvn206.setBuilder( mvn206 );
        jdk2mvn206.setName( jdk2mvn206Name );
        getProfileService().addProfile( jdk2mvn206 );

        mvnOpts1 = new Installation();
        mvnOpts1.setType( InstallationService.ENVVAR_TYPE );
        mvnOpts1.setVarName( "MAVEN_OPTS" );
        mvnOpts1.setVarValue( "-Xmx256m -Djava.awt.headless=true" );
        mvnOpts1.setName( mvnOpts1Name );
        mvnOpts1 = getInstallationService().add( mvnOpts1 );

        mvnOpts2 = new Installation();
        mvnOpts2.setType( InstallationService.ENVVAR_TYPE );
        mvnOpts2.setVarName( "MAVEN_OPTS" );
        mvnOpts2.setVarValue( "-Xmx1024m -Xms1024m" );
        mvnOpts2.setName( mvnOpts2Name );
        mvnOpts2 = getInstallationService().add( mvnOpts2 );
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

        {
            throw new AlreadyExistsInstallationException(
                "Installation with name " + installation.getName() + " already exists" );
        }
        // TODO must be done in the same transaction
        Installation storedOne;
        try
        {
            String envVarName = this.getEnvVar( installation.getType() );
            // override with the defined var name for defined types
            if ( StringUtils.isNotEmpty( envVarName ) )
            {
                installation.setVarName( envVarName );
            }
            storedOne = installationDao.addInstallation( installation );
        }
        catch ( ContinuumStoreException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }
        try
        {
            if ( automaticProfile )
            {
                Profile profile = new Profile();
                profile.setName( storedOne.getName() );
                profile = profileService.addProfile( profile );
                profileService.addInstallationInProfile( profile, storedOne );
            }
        }
        catch ( ProfileException e )
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

    public void update( Installation installation )
        throws InstallationException, AlreadyExistsInstallationException
    {
        try
        {
            Installation stored = getInstallation( installation.getInstallationId() );
            if ( stored == null )
            {
                throw new InstallationException( "installation with name " + installation.getName() + " not exists" );
            }

            stored.setName( installation.getName() );
            if ( alreadyExistInstallationName( installation ) )
            {
                throw new AlreadyExistsInstallationException(
                    "Installation with name " + installation.getName() + " already exists" );
            }
            stored.setType( installation.getType() );
            String envVarName = this.getEnvVar( installation.getType() );
            // override with the defined var name for defined types
            if ( StringUtils.isNotEmpty( envVarName ) )
            {
                installation.setVarName( envVarName );
            }
            else
            {
                stored.setVarName( installation.getVarName() );
            }
            stored.setVarValue( installation.getVarValue() );
            installationDao.updateInstallation( stored );
        }
        catch ( ContinuumStoreException e )
        {
            throw new InstallationException( e.getMessage(), e );
View Full Code Here

Examples of org.apache.maven.continuum.model.system.Installation

    private List<String> getBuilderVersion( BuildDefinition buildDefinition, Project project )
        throws InstallationException
    {
        ExecutorConfigurator executorConfigurator;
        Installation builder = null;
        Profile profile = null;
        if ( buildDefinition != null )
        {
            profile = buildDefinition.getProfile();
            if ( profile != null )
            {
                builder = profile.getBuilder();
            }
        }
        if ( builder != null )
        {
            executorConfigurator = continuum.getInstallationService().getExecutorConfigurator( builder.getType() );
        }
        else
        {
            // depends on ExecutorId
            if ( MavenTwoBuildExecutor.ID.equals( project.getExecutorId() ) )
            {
                executorConfigurator =
                    continuum.getInstallationService().getExecutorConfigurator( InstallationService.MAVEN2_TYPE );
            }
            else if ( MavenOneBuildExecutor.ID.equals( project.getExecutorId() ) )
            {
                executorConfigurator =
                    continuum.getInstallationService().getExecutorConfigurator( InstallationService.MAVEN1_TYPE );
            }
            else if ( AntBuildExecutor.ID.equals( project.getExecutorId() ) )
            {
                executorConfigurator =
                    continuum.getInstallationService().getExecutorConfigurator( InstallationService.ANT_TYPE );
            }
            else
            {
                return Arrays.asList( "No builder defined" );
            }
        }

        return continuum.getInstallationService().getExecutorConfiguratorVersion(
            builder == null ? null : builder.getVarValue(), executorConfigurator, profile );
    }
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.