Examples of StringStreamConsumer


Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );

        cl.addArguments( CommandLineUtils.translateCommandline( arguments ) );

        StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();

        StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();

        System.out.println( "Test command line: " + cl );

        int exitValue = CommandLineUtils.executeCommandLine( cl, stdout, stderr );

        if ( debugExecute || exitValue != 0 )
        {
            System.err.println( "-----------------------------------------" );
            System.err.println( "Command line: " + cl );
            System.err.println( "Working directory: " + cl.getWorkingDirectory() );
            System.err.println( "-----------------------------------------" );
            System.err.println( "Standard output: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stdout.getOutput() );
            System.err.println( "-----------------------------------------" );

            System.err.println( "Standard error: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stderr.getOutput() );
            System.err.println( "-----------------------------------------" );
        }

        if ( exitValue != 0 )
        {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );

        cl.addArguments( CommandLineUtils.translateCommandline( arguments ) );

        StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();

        StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();

        System.out.println( "Test command line: " + cl );

        int exitValue = CommandLineUtils.executeCommandLine( cl, stdout, stderr );

        if ( debugExecute || exitValue != 0 )
        {
            System.err.println( "-----------------------------------------" );
            System.err.println( "Command line: " + cl );
            System.err.println( "Working directory: " + cl.getWorkingDirectory() );
            System.err.println( "-----------------------------------------" );
            System.err.println( "Standard output: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stdout.getOutput() );
            System.err.println( "-----------------------------------------" );

            System.err.println( "Standard error: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stderr.getOutput() );
            System.err.println( "-----------------------------------------" );
        }

        if ( exitValue != 0 )
        {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

            throw new ScmException( "Error while executing TFS command line - " + getCommandString(), e );
        }
        info( "err - " + err.getOutput() );
        if ( out instanceof StringStreamConsumer )
        {
            StringStreamConsumer sc = (StringStreamConsumer) out;
            debug( sc.getOutput() );
        }
        if ( out instanceof FileListConsumer )
        {
            FileListConsumer f = (FileListConsumer) out;
            for ( Iterator<ScmFile> i = f.getFiles().iterator(); i.hasNext(); )
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

    protected ScmResult executeBranchCommand( ScmProviderRepository r, ScmFileSet f, String branch, String message )
        throws ScmException
    {
        TfsCommand command = createCommand( r, f, branch );
        StringStreamConsumer out = new StringStreamConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new BranchScmResult( command.getCommandString(), "Error code for TFS branch command - " + status,
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

                                           ScmTagParameters scmTagParameters )
        throws ScmException
    {
        TfsCommand command = createCommand( r, f, tag, scmTagParameters );

        StringStreamConsumer out = new StringStreamConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();

        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );

        cl.addArguments( CommandLineUtils.translateCommandline( arguments ) );

        StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();

        StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();

        System.out.println( "Test command line: " + cl );

        int exitValue = CommandLineUtils.executeCommandLine( cl, stdout, stderr );

        if ( debugExecute || exitValue != 0 )
        {
            System.err.println( "-----------------------------------------" );
            System.err.println( "Command line: " + cl );
            System.err.println( "Working directory: " + cl.getWorkingDirectory() );
            System.err.println( "-----------------------------------------" );
            System.err.println( "Standard output: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stdout.getOutput() );
            System.err.println( "-----------------------------------------" );

            System.err.println( "Standard error: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stderr.getOutput() );
            System.err.println( "-----------------------------------------" );
        }

        if ( exitValue != 0 )
        {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );

        cl.addArguments( CommandLineUtils.translateCommandline( arguments ) );

        StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();

        StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();

        System.out.println( "Test command line: " + cl );

        int exitValue = CommandLineUtils.executeCommandLine( cl, stdout, stderr );

        if ( debugExecute || exitValue != 0 )
        {
            System.err.println( "-----------------------------------------" );
            System.err.println( "Command line: " + cl );
            System.err.println( "Working directory: " + cl.getWorkingDirectory() );
            System.err.println( "-----------------------------------------" );
            System.err.println( "Standard output: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stdout.getOutput() );
            System.err.println( "-----------------------------------------" );

            System.err.println( "Standard error: " );
            System.err.println( "-----------------------------------------" );
            System.err.println( stderr.getOutput() );
            System.err.println( "-----------------------------------------" );
        }

        if ( exitValue != 0 )
        {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

                                           ScmTagParameters scmTagParameters )
        throws ScmException
    {
        TfsCommand command = createCommand( r, f, tag, scmTagParameters );

        StringStreamConsumer out = new StringStreamConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();

        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

            throw new ScmException( "Error while executing TFS command line - " + getCommandString(), e );
        }
        info( "err - " + err.getOutput() );
        if ( out instanceof StringStreamConsumer )
        {
            StringStreamConsumer sc = (StringStreamConsumer) out;
            debug( sc.getOutput() );
        }
        if ( out instanceof FileListConsumer )
        {
            FileListConsumer f = (FileListConsumer) out;
            for ( Iterator<ScmFile> i = f.getFiles().iterator(); i.hasNext(); )
View Full Code Here

Examples of org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer

    protected ScmResult executeBranchCommand( ScmProviderRepository r, ScmFileSet f, String branch, String message )
        throws ScmException
    {
        TfsCommand command = createCommand( r, f, branch );
        StringStreamConsumer out = new StringStreamConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
        int status = command.execute( out, err );
        getLogger().info( "status of branch command is= " + status + "; err= " + err.getOutput() );
        if ( status != 0 || err.hasBeenFed() )
        {
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.