Package org.apache.maven.continuum.release

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


                return ERROR;
            }
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
   
            if ( listener != null )
            {
                listenerSummary.setPhases( listener.getPhases() );
                listenerSummary.setCompletedPhases( listener.getCompletedPhases() );
                listenerSummary.setInProgress( listener.getInProgress() );
                listenerSummary.setError( listener.getError() );

                if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
                {
                    result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
   
                    return SUCCESS;
                }
                else
                {
View Full Code Here


        }
        else
        {
            listener = new DefaultReleaseManagerListener();
   
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

            //todo should be configurable
            File performDirectory = new File( getContinuum().getConfiguration().getWorkingDirectory(),
                                              "releases-" + System.currentTimeMillis() );
            performDirectory.mkdirs();

            releaseManager.perform( releaseId, performDirectory, goals, arguments, useReleaseProfile, listener,
                                    repository );
        }

        return SUCCESS;
    }
View Full Code Here

            return SUCCESS;
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
            descriptor.setScmSourceUrl( scmUrl );
            descriptor.setScmUsername( scmUsername );
            descriptor.setScmPassword( scmPassword );
            descriptor.setScmReleaseLabel( scmTag );
            descriptor.setScmTagBase( scmTagBase );
   
            if ( profileId != -1 )
            {
                Profile profile = getContinuum().getProfileService().getProfile( profileId );
                descriptor.setEnvironments( getEnvironments( profile ) );
            }
   
            do
            {
                releaseId = String.valueOf( System.currentTimeMillis() );
            }
            while ( releaseManager.getPreparedReleases().containsKey( releaseId ) );
   
            releaseManager.getPreparedReleases().put( releaseId, descriptor );
   
            return execute();
        }
    }
View Full Code Here

                return ERROR;
            }
        }
        else
        {
            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

                preparedReleaseName = null;
            }
        }
        else
        {
            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

                preparedReleaseName = null;
            }
        }
        else
        {
            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

        }
        else
        {
            listener = new DefaultReleaseManagerListener();
   
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

            //todo should be configurable
            File performDirectory = new File( getContinuum().getConfiguration().getWorkingDirectory(),
                                              "releases-" + System.currentTimeMillis() );
            performDirectory.mkdirs();

            releaseManager.perform( releaseId, performDirectory, goals, arguments, useReleaseProfile, listener,
                                    repository );
        }

        AuditLog event = new AuditLog( "ReleaseId=" + releaseId, AuditLogConstants.PERFORM_RELEASE );
        event.setCategory( AuditLogConstants.PROJECT );
View Full Code Here

            return SUCCESS;
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
            descriptor.setScmSourceUrl( scmUrl );
            descriptor.setScmUsername( scmUsername );
            descriptor.setScmPassword( scmPassword );
            descriptor.setScmReleaseLabel( scmTag );
            descriptor.setScmTagBase( scmTagBase );
   
            if ( profileId != -1 )
            {
                Profile profile = getContinuum().getProfileService().getProfile( profileId );
                descriptor.setEnvironments( getEnvironments( profile ) );
            }
   
            do
            {
                releaseId = String.valueOf( System.currentTimeMillis() );
            }
            while ( releaseManager.getPreparedReleases().containsKey( releaseId ) );
   
            releaseManager.getPreparedReleases().put( releaseId, descriptor );
   
            return execute();
        }
    }
View Full Code Here

                throw new Exception( "There is no on-going or finished release operation with id " + releaseId );
            }
        }
        else
        {
            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";
                }

                listenerSummary.setPhases( listener.getPhases() );
                listenerSummary.setCompletedPhases( listener.getCompletedPhases() );
                listenerSummary.setInProgress( listener.getInProgress() );
                listenerSummary.setError( listener.getError() );
            }
            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

                return ERROR;
            }
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
   
            if ( listener != null )
            {
                listenerSummary.setPhases( listener.getPhases() );
                listenerSummary.setCompletedPhases( listener.getCompletedPhases() );
                listenerSummary.setInProgress( listener.getInProgress() );
                listenerSummary.setError( listener.getError() );

                if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
                {
                    result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
   
                    return SUCCESS;
                }
                else
                {
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.