Examples of ContinuumReleaseManagerListener


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

    @SuppressWarnings( "unchecked" )
    public void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile,
                                Map repository, String username )
        throws ContinuumReleaseException
    {
        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

        listener.setUsername( username );

        LocalRepository repo = null;

        if ( !repository.isEmpty() )
        {
View Full Code Here

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

    public String releaseCleanup( String releaseId )
    {
        releaseManager.getReleaseResults().remove( releaseId );

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

        if ( listener != null )
        {
            return listener.getGoalName() + "Finished";
        }
        else
        {
            return "";
        }
View Full Code Here

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

    }

    public void releaseRollback( String releaseId, int projectId )
        throws ContinuumReleaseException
    {
        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

        releaseManager.rollback( releaseId, buildAgentConfigurationService.getWorkingDirectory( projectId ).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 );

        if ( StringUtils.isNotBlank( listener.getError() ) )
        {
            throw new ContinuumReleaseException( "Failed to rollback release: " + listener.getError() );
        }
    }
View Full Code Here

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

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

            ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

            listener.setUsername( getPrincipal() );

            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 );
                }
View Full Code Here

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

        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();

            releaseManager.getReleaseResults().remove( releaseId );

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

            if ( listener != null )
            {
                String goal = listener.getGoalName();

                return goal + "Finished";
            }
            else
            {
View Full Code Here

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

        }
        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 );
                }
View Full Code Here

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

    {
        Project project = getProject( projectMap );

        Properties releaseProperties = getReleaseProperties( properties );

        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

        String workingDirectory = buildAgentConfigurationService.getWorkingDirectory( project.getId() ).getPath();

        String executable = buildAgentInstallationService.getExecutorConfigurator( BuildAgentInstallationService.MAVEN2_TYPE ).getExecutable();
View Full Code Here

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

        return (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
    }

    public Map getListener( String releaseId )
    {
        ContinuumReleaseManagerListener listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );

        Map map = new HashMap();

        if ( listener != null )
        {
            map.put( ContinuumBuildAgentUtil.KEY_RELEASE_STATE, new Integer( listener.getState() ) );
            if ( listener.getPhases() != null )
            {
                map.put( ContinuumBuildAgentUtil.KEY_RELEASE_PHASES, listener.getPhases() );
            }
            if ( listener.getCompletedPhases() != null )
            {
                map.put( ContinuumBuildAgentUtil.KEY_COMPLETED_RELEASE_PHASES, listener.getCompletedPhases() );
            }
            if ( listener.getInProgress() != null )
            {
                map.put( ContinuumBuildAgentUtil.KEY_RELEASE_IN_PROGRESS, listener.getInProgress() );
            }
            if ( listener.getError() != null )
            {
                map.put( ContinuumBuildAgentUtil.KEY_RELEASE_ERROR, listener.getError() );
            }
        }

        return map;
    }
View Full Code Here

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

    }

    public void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository )
        throws ContinuumReleaseException
    {
        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

        LocalRepository repo = null;

        if ( !repository.isEmpty() )
        {
View Full Code Here

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

    public String releaseCleanup( String releaseId )
    {
        releaseManager.getReleaseResults().remove( releaseId );

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

        if ( listener != null )
        {
            return listener.getGoalName() + "Finished";
        }
        else
        {
            return "";
        }
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.