Package org.apache.maven.continuum.installation

Examples of org.apache.maven.continuum.installation.InstallationException


            return this.add( installation, false );
        }
        catch ( AlreadyExistsProfileException e )
        {
            // normally cannot happend here but anyway we throw the exception
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here


            }
            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 )
        {
            throw new InstallationException( "failed to create automatic Profile " + e.getMessage(), e );
        }
        return storedOne;
    }
View Full Code Here

        {
            installationDao.removeInstallation( installation );
        }
        catch ( ContinuumStoreException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }

    }
View Full Code Here

            List<Installation> installations = installationDao.getAllInstallations();
            return installations == null ? Collections.EMPTY_LIST : installations;
        }
        catch ( ContinuumStoreException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here

        {
            return installationDao.getInstallation( installationId );
        }
        catch ( ContinuumStoreException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here

        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

            return getJavaHomeInformations( javaHome );

        }
        catch ( IOException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }
        catch ( CommandLineException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here

        {
            return getJavaHomeInformations( installation.getVarValue() );
        }
        catch ( CommandLineException e )
        {
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here

                    cliOutput.add( line );
                }
            } );
            if ( result != 0 )
            {
                throw new InstallationException( "cli to get " + executable + " version return code " + result );
            }
            return cliOutput;
        }
        catch ( CommandLineException e )
        {
            log.error( "fail to execute " + executable + " with arg " + executorConfigurator.getVersionArgument() );
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here

            return this.add( installation, false );
        }
        catch ( AlreadyExistsProfileException e )
        {
            // normally cannot happend here but anyway we throw the exception
            throw new InstallationException( e.getMessage(), e );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.installation.InstallationException

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.