Package org.apache.maven.continuum.release

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


    }

    public String executeFromScm()
        throws Exception
    {
        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        ReleaseDescriptor descriptor = new ReleaseDescriptor();
        descriptor.setScmSourceUrl( scmUrl );
        descriptor.setScmUsername( scmUsername );
        descriptor.setScmReleaseLabel( scmTag );
        descriptor.setScmTagBase( scmTagBase );

        do
        {
            releaseId = String.valueOf( System.currentTimeMillis() );
        }
        while ( releaseManager.getPreparedReleases().containsKey( releaseId ) );

        releaseManager.getPreparedReleases().put( releaseId, descriptor );

        return execute();
    }
View Full Code Here


            return REQUIRES_AUTHORIZATION;
        }

        listener = new DefaultReleaseManagerListener();

        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

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

        //todo should be configurable
        File performDirectory = new File( getContinuum().getConfiguration().getWorkingDirectory(),
                                          "releases-" + System.currentTimeMillis() );
        performDirectory.mkdirs();
       
        LocalRepository repository = project.getProjectGroup().getLocalRepository();
       
        releaseManager.perform( releaseId, performDirectory, goals, useReleaseProfile, listener, repository );

        return SUCCESS;
    }
View Full Code Here

    }

    public String executeFromScm()
        throws Exception
    {
        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

        ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
        descriptor.setScmSourceUrl( scmUrl );
        descriptor.setScmUsername( scmUsername );
        descriptor.setScmPassword( scmPassword );
        descriptor.setScmReleaseLabel( scmTag );
        descriptor.setScmTagBase( scmTagBase );
       
        Profile profile = null;
       
        if ( profileId != -1 )
        {
            profile = getContinuum().getProfileService().getProfile( profileId );
            descriptor.setEnvironments( releaseManager.getEnvironments( profile ) );
        }

        do
        {
            releaseId = String.valueOf( System.currentTimeMillis() );
        }
        while ( releaseManager.getPreparedReleases().containsKey( releaseId ) );

        releaseManager.getPreparedReleases().put( releaseId, descriptor );

        return execute();
    }
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

        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

        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

        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

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.