Package org.apache.maven.scm.command.status

Examples of org.apache.maven.scm.command.status.StatusScmResult


        ErrorStreamConsumer err = new ErrorStreamConsumer();
       
        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new StatusScmResult( command.getCommandString(), "Error code for TFS status command - " + status,
                                        err.getOutput(), false );
        }
        Iterator<ScmFile> iter = out.getChangedFiles().iterator();
        getLogger().debug( "Iterating" );
        while ( iter.hasNext() )
        {
            ScmFile file = (ScmFile) iter.next();
            getLogger().debug( file.getPath() + ":" + file.getStatus() );
        }
        return new StatusScmResult( command.getCommandString(), out.getChangedFiles() );
    }
View Full Code Here


        setCheckOutScmResult( new CheckOutScmResult( "", "", "", true ) );
        setDiffScmResult( new DiffScmResult( "", "", "", true ) );
        setEditScmResult( new EditScmResult( "", "", "", true ) );
        setExportScmResult( new ExportScmResult( "", "", "", true ) );
        setRemoveScmResult( new RemoveScmResult( "", "", "", true ) );
        setStatusScmResult( new StatusScmResult( "", "", "", true ) );
        setTagScmResult( new TagScmResult( "", "", "", true ) );
        setUnEditScmResult( new UnEditScmResult( "", "", "", true ) );
        setUpdateScmResult( new UpdateScmResult( "", "", "", true ) );
        setBlameScmResult( new BlameScmResult( "", "", "", true ) );
        setMkdirScmResult( new MkdirScmResult( "", "", "", true ) );
View Full Code Here

        catch ( NoSuchScmProviderException e )
        {
            throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
        }

        StatusScmResult result;
        try
        {
            result =
                provider.status( repository, new ScmFileSet( new File( releaseDescriptor.getWorkingDirectory() ) ) );
        }
        catch ( ScmException e )
        {
            throw new ReleaseExecutionException( "An error occurred during the status check process: " + e.getMessage(),
                                                 e );
        }

        if ( !result.isSuccess() )
        {
            throw new ReleaseScmCommandException( "Unable to check for local modifications", result );
        }

        List<ScmFile> changedFiles = result.getChangedFiles();

        if ( !changedFiles.isEmpty() )
        {
            ScmTranslator scmTranslator = scmTranslators.get( repository.getProvider() );
           
View Full Code Here

        }
        if ( scmConnection == null )
        {
            throw new MojoFailureException("No SCM connection specified.  You must specify an SCM connection by adding a <connection> element to your <scm> element in your POM");
        }
        StatusScmResult result;
        try
        {
            ScmRepository repository = scmManager.makeScmRepository( scmConnection );
            result = scmManager.status( repository, new ScmFileSet( baseDir ) );
        }
        catch ( Exception e )
        {
            throw new MojoExecutionException( "Couldn't configure SCM repository: " + e.getLocalizedMessage(), e );
        }

        List changedFiles = result.getChangedFiles();
       
        List projectDirectories = getProjectDirectories();
        Set changedDirectories = new HashSet();
        for (Object changedFile1 : changedFiles) {
            ScmFile changedScmFile = (ScmFile) changedFile1;
View Full Code Here

        ScmManager scmManager = (ScmManager) lookup( ScmManager.ROLE );
        ScmProviderStub providerStub =
            (ScmProviderStub) scmManager.getProviderByUrl( releaseDescriptor.getScmSourceUrl() );

        providerStub.setStatusScmResult( new StatusScmResult( "", "", "", false ) );

        try
        {
            phase.execute( releaseDescriptor, new DefaultReleaseEnvironment(), null );
View Full Code Here

    {
        ScmManager scmManager = (ScmManager) lookup( ScmManager.ROLE );
        ScmProviderStub providerStub =
            (ScmProviderStub) scmManager.getProviderByUrl( releaseDescriptor.getScmSourceUrl() );

        providerStub.setStatusScmResult( new StatusScmResult( "", createScmFiles( changedFiles ) ) );
    }
View Full Code Here

        catch ( NoSuchScmProviderException e )
        {
            throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
        }

        StatusScmResult result;
        try
        {
            result =
                provider.status( repository, new ScmFileSet( new File( releaseDescriptor.getWorkingDirectory() ) ) );
        }
        catch ( ScmException e )
        {
            throw new ReleaseExecutionException( "An error occurred during the status check process: " + e.getMessage(),
                                                 e );
        }

        if ( !result.isSuccess() )
        {
            throw new ReleaseScmCommandException( "Unable to check for local modifications", result );
        }

        List<ScmFile> changedFiles = result.getChangedFiles();

        if ( !changedFiles.isEmpty() )
        {
            ScmTranslator scmTranslator = scmTranslators.get( repository );
           
View Full Code Here

            throw new ScmException( "Error while executing clearcase command.", ex );
        }

        if ( exitCode != 0 )
        {
            return new StatusScmResult( cl.toString(), "The cleartool command failed.", stderr.getOutput(), false );
        }

        return new StatusScmResult( cl.toString(), consumer.getAddedFiles() );
    }
View Full Code Here

            throw new ScmException( "Error while executing clearcase command.", ex );
        }

        if ( exitCode != 0 )
        {
            return new StatusScmResult( cl.toString(), "The cleartool command failed.", stderr.getOutput(), false );
        }

        return new StatusScmResult( cl.toString(), consumer.getCheckedOutFiles() );
    }
View Full Code Here

            throw new ScmException( "Error while executing clearcase command.", ex );
        }

        if ( exitCode != 0 )
        {
            return new StatusScmResult( cl.toString(), "The cleartool command failed.", stderr.getOutput(), false );
        }

        return new StatusScmResult( cl.toString(), consumer.getUnEditFiles() );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.command.status.StatusScmResult

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.