Package org.apache.maven.continuum.release

Examples of org.apache.maven.continuum.release.ContinuumReleaseManager


        catch ( AuthorizationRequiredException e )
        {
            return REQUIRES_AUTHORIZATION;
        }

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

        Project project = getContinuum().getProject( projectId );

        releaseManager.rollback( releaseId, workingDirectoryService.getWorkingDirectory( project ).getPath(), listener );

        //recurse until rollback is finished
        while ( listener.getState() != ContinuumReleaseManagerListener.FINISHED )
        {
            try
            {
                Thread.sleep( 1000 );
            }
            catch ( InterruptedException e )
            {
                //do nothing
            }
        }

        releaseManager.getPreparedReleases().remove( releaseId );

        return SUCCESS;
    }
View Full Code Here


        Project project = getContinuum().getProjectWithAllDetails( projectId );

        String releaseId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() );

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        Map preparedReleases = releaseManager.getPreparedReleases();
        if ( preparedReleases.containsKey( releaseId ) )
        {
            ReleaseDescriptor descriptor = (ReleaseDescriptor) preparedReleases.get( releaseId );

            preparedReleaseName = descriptor.getReleaseVersions().get( releaseId ).toString();
View Full Code Here

       
        project = getContinuum().getProjectWithAllDetails( projectId );

        String releaseId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() );

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        Map preparedReleases = releaseManager.getPreparedReleases();
        if ( preparedReleases.containsKey( releaseId ) )
        {
            ReleaseDescriptor descriptor = (ReleaseDescriptor) preparedReleases.get( releaseId );

            preparedReleaseName = descriptor.getReleaseVersions().get( releaseId ).toString();
View Full Code Here

            return REQUIRES_AUTHORIZATION;
        }

        String status = "";

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );

        if ( listener != null )
        {
            if ( listener.getState() == ContinuumReleaseManagerListener.LISTENING )
            {
                status = "inProgress";
            }
            else if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
            {
                status = SUCCESS;
            }
            else
            {
                status = "initialized";
            }
        }
        else
        {
            throw new Exception( "There is no on-going or finished release operation with id " + releaseId );
        }

        if ( status.equals( SUCCESS ) )
        {
            ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );

            if ( result != null && getContinuum().getContinuumReleaseResult( projectId, releaseGoal, result.getStartTime(), result.getEndTime() ) == null )
            {
                ContinuumReleaseResult releaseResult = createContinuumReleaseResult( result );
                getContinuum().addContinuumReleaseResult( releaseResult );
View Full Code Here

        catch ( AuthorizationRequiredException e )
        {
            return REQUIRES_AUTHORIZATION;
        }

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );

        if ( listener != null )
        {
            if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
            {
                result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );

                return SUCCESS;
            }
            else
            {
View Full Code Here

        catch ( AuthorizationRequiredException e )
        {
            return REQUIRES_AUTHORIZATION;
        }

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        releaseManager.getReleaseResults().remove( releaseId );

        ContinuumReleaseManagerListener listener =
            (ContinuumReleaseManagerListener) releaseManager.getListeners().remove( releaseId );

        if ( listener != null )
        {
            String goal = listener.getGoalName();
View Full Code Here

        if ( profileId != -1 )
        {
            profile = getContinuum().getProfileService().getProfile( profileId );
        }

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        releaseId =
            releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(), getDevVersionMap(), listener, profile );

        return SUCCESS;
    }
View Full Code Here

            return REQUIRES_AUTHORIZATION;
        }

        String status;

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );

        if ( listener != null )
        {
            if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
            {
                releaseManager.getListeners().remove( releaseId );

                result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );

                status = "finished";
            }
            else
            {
View Full Code Here

        else
        {
            scmTagBase = "";
        }

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        //CONTINUUM-1503
        releaseManager.sanitizeTagName( scmUrl, scmTag );

        prepareGoals = "clean integration-test";

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
View Full Code Here

            listener.setUsername( username );

            String workingDirectory = getContinuum().getWorkingDirectory( projectId ).getPath();

            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

            String executable = getContinuum().getInstallationService().getExecutorConfigurator(
                InstallationService.MAVEN2_TYPE ).getExecutable();

            if ( environments != null )
            {
                String m2Home = environments.get( getContinuum().getInstallationService().getEnvVar(
                    InstallationService.MAVEN2_TYPE ) );
                if ( StringUtils.isNotEmpty( m2Home ) )
                {
                    executable = m2Home + File.separator + "bin" + File.separator + executable;
                }
            }

            releaseId = releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(), getDevVersionMap(),
                                                listener, workingDirectory, environments, executable );
        }

        AuditLog event = new AuditLog( "Release id=" + releaseId, AuditLogConstants.PREPARE_RELEASE );
        event.setCategory( AuditLogConstants.PROJECT );
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.release.ContinuumReleaseManager

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.