Package org.apache.maven.scm.provider.jazz.command.consumer

Examples of org.apache.maven.scm.provider.jazz.command.consumer.DebugLoggerConsumer


        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "Executing unedit command..." );
        }

        DebugLoggerConsumer uneditConsumer = new DebugLoggerConsumer( getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        JazzScmCommand uneditCmd = createUneditCommand( repo, fileSet );
        int status = uneditCmd.execute( uneditConsumer, errConsumer );

        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new UnEditScmResult( uneditCmd.getCommandString(),
                                        "Error code for Jazz SCM unedit command - " + status, errConsumer.getOutput(),
                                        false );
        }

        return new UnEditScmResult( uneditCmd.getCommandString(), "Successfully Completed.", uneditConsumer.getOutput(),
                                    true );
    }
View Full Code Here


        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "Executing edit command..." );
        }

        DebugLoggerConsumer editConsumer = new DebugLoggerConsumer( getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        JazzScmCommand editCmd = createEditCommand( repo, fileSet );
        int status = editCmd.execute( editConsumer, errConsumer );

        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new EditScmResult( editCmd.getCommandString(), "Error code for Jazz SCM edit command - " + status,
                                      errConsumer.getOutput(), false );
        }

        return new EditScmResult( editCmd.getCommandString(), "Successfully Completed.", editConsumer.getOutput(),
                                  true );
    }
View Full Code Here

        }

        // Create a changeset. We need to do this, as otherwise the information contained in the message
        // will be lost forever.
        JazzScmCommand createChangesetCmd = createCreateChangesetCommand( repository, fileSet, message );
        DebugLoggerConsumer outputConsumer = new DebugLoggerConsumer( getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        int status = createChangesetCmd.execute( outputConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
View Full Code Here

        if ( jazzRepo.isPushChangesAndHaveFlowTargets() )
        {
            // Push if we need too
            JazzScmCommand deliverCmd = createDeliverCommand( (JazzScmProviderRepository) repo, fileSet );
            StreamConsumer deliverConsumer =
                new DebugLoggerConsumer( getLogger() );      // No need for a dedicated consumer for this
            ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

            int status = deliverCmd.execute( deliverConsumer, errConsumer );
            if ( status != 0 || errConsumer.hasBeenFed() )
            {
View Full Code Here

                getLogger().debug( "Full Path     : '" + fullPath + "'" );
                getLogger().debug( "Relative Path : '" + relativePath + "'" );

                // Now call "scm diff on it"
                // In this case, we use the DebugLoggerConsumer's ability to store captured output
                DebugLoggerConsumer diffConsumer = new DebugLoggerConsumer( getLogger() );
                ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
                diffCmd = createDiffCommand( repo, fileSet, relativePath );
                int status = diffCmd.execute( diffConsumer, errConsumer );
                if ( status != 0 || errConsumer.hasBeenFed() )
                {
                    // Return a false result (not the usual SCMResult)
                    return new DiffScmResult( diffCmd.toString(), "The scm diff command failed.",
                                              errConsumer.getOutput(), false );
                }
                // Append to patch (all combined)
                patch.append( diffConsumer.getOutput() );
                // Set the differences map <File, <CharSequence>
                differences.put( relativePath, diffConsumer.getOutput() );
            }
        }

        return new DiffScmResult( diffCmd.toString(), statusCmdResult.getChangedFiles(), differences,
                                  patch.toString() );
View Full Code Here

        JazzScmProviderRepository jazzRepo = (JazzScmProviderRepository) repo;

        getLogger().debug( "Creating Snapshot..." );
        StreamConsumer tagConsumer =
            new DebugLoggerConsumer( getLogger() );      // No need for a dedicated consumer for this
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
        JazzScmCommand tagCreateSnapshotCmd =
            createTagCreateSnapshotCommand( jazzRepo, fileSet, tag, scmTagParameters );
        int status = tagCreateSnapshotCmd.execute( tagConsumer, errConsumer );
View Full Code Here

                getLogger().debug( "Full Path     : '" + fullPath + "'" );
                getLogger().debug( "Relative Path : '" + relativePath + "'" );

                // Now call "scm diff on it"
                // In this case, we use the DebugLoggerConsumer's ability to store captured output
                DebugLoggerConsumer diffConsumer = new DebugLoggerConsumer( getLogger() );
                ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
                diffCmd = createDiffCommand( repo, fileSet, relativePath );
                int status = diffCmd.execute( diffConsumer, errConsumer );
                if ( status != 0 || errConsumer.hasBeenFed() )
                {
                    // Return a false result (not the usual SCMResult)
                    return new DiffScmResult( diffCmd.toString(), "The scm diff command failed.",
                                              errConsumer.getOutput(), false );
                }
                // Append to patch (all combined)
                patch.append( diffConsumer.getOutput() );
                // Set the differences map <File, <CharSequence>
                differences.put( relativePath, diffConsumer.getOutput() );
            }
        }

        return new DiffScmResult( diffCmd.toString(), statusCmdResult.getChangedFiles(), differences,
                                  patch.toString() );
View Full Code Here

        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "Executing edit command..." );
        }

        DebugLoggerConsumer editConsumer = new DebugLoggerConsumer( getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        JazzScmCommand editCmd = createEditCommand( repo, fileSet );
        int status = editCmd.execute( editConsumer, errConsumer );

        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new EditScmResult( editCmd.getCommandString(), "Error code for Jazz SCM edit command - " + status,
                                      errConsumer.getOutput(), false );
        }

        return new EditScmResult( editCmd.getCommandString(), "Successfully Completed.", editConsumer.getOutput(),
                                  true );
    }
View Full Code Here

        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "Executing unedit command..." );
        }

        DebugLoggerConsumer uneditConsumer = new DebugLoggerConsumer( getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        JazzScmCommand uneditCmd = createUneditCommand( repo, fileSet );
        int status = uneditCmd.execute( uneditConsumer, errConsumer );

        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new UnEditScmResult( uneditCmd.getCommandString(),
                                        "Error code for Jazz SCM unedit command - " + status, errConsumer.getOutput(),
                                        false );
        }

        return new UnEditScmResult( uneditCmd.getCommandString(), "Successfully Completed.", uneditConsumer.getOutput(),
                                    true );
    }
View Full Code Here

        throws ScmException
    {
        JazzScmProviderRepository jazzRepo = (JazzScmProviderRepository) repository;

        StreamConsumer tckConsumer =
            new DebugLoggerConsumer( getLogger() );      // No need for a dedicated consumer for this
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
        String nameWorkspace = jazzRepo.getRepositoryWorkspace();
        //String nameSnapshot = "MavenSCMTestSnapshot";
        String nameSnapshot = getSnapshotName();
        JazzScmCommand tckCreateWorkspaceFromSnapshotCmd =
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.jazz.command.consumer.DebugLoggerConsumer

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.