Package org.apache.maven.continuum.release

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


    {
        Project project = getProject( projectMap );

        Properties releaseProperties = getReleaseProperties( properties );

        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
       
        listener.setUsername( username );

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

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


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

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

        Map<String, Object> map = new HashMap<String, Object>();

        if ( listener != null )
        {
            map.put( ContinuumBuildAgentUtil.KEY_RELEASE_STATE, listener.getState() );
           
            map.put( ContinuumBuildAgentUtil.KEY_USERNAME, listener.getUsername() );
           
            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

    @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

    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

    }

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

        }
        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

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

        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

                                  Map<String, String> environments, String username )
        throws ContinuumReleaseException
    {
        Project project = getProject( projectMap );

        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();

        listener.setUsername( username );

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

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

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

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

        Map<String, Object> map = new HashMap<String, Object>();

        if ( listener != null )
        {
            map.put( ContinuumBuildAgentUtil.KEY_RELEASE_STATE, listener.getState() );

            map.put( ContinuumBuildAgentUtil.KEY_USERNAME, listener.getUsername() );

            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

TOP

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

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.