Package org.apache.maven.shared.utils.cli

Examples of org.apache.maven.shared.utils.cli.StreamConsumer


            cli.setWorkingDirectory( basedir );

            Writer logWriter = new FileWriter( new File( basedir, LOG_FILENAME ) );

            StreamConsumer out = new WriterStreamConsumer( logWriter );

            StreamConsumer err = new WriterStreamConsumer( logWriter );

            System.out.println( "Command: " + CommandLineUtils.toString( cli.getCommandline() ) );

            int ret = CommandLineUtils.executeCommandLine( cli, out, err );
View Full Code Here


            cmd.createArg().setValue( cliArg );
        }

        Writer logWriter = new FileWriter( logFile );

        StreamConsumer out = new WriterStreamConsumer( logWriter );

        StreamConsumer err = new WriterStreamConsumer( logWriter );

        try
        {
            return CommandLineUtils.executeCommandLine( cmd, out, err );
        }
View Full Code Here

            {
                return -1;
            }

        };
        StreamConsumer systemOut = request.getSystemOutStreamConsumer();

        if ( systemOut == null )
        {
            systemOut = new StreamConsumer()
            {

                public void consumeLine( final String line )
                {
                    if ( verbose )
                    {
                        getLogger().info( line );
                    }
                    else
                    {
                        getLogger().debug( line );
                    }
                }

            };
        }

        StreamConsumer systemErr = request.getSystemErrorStreamConsumer();

        if ( systemErr == null )
        {
            systemErr = new StreamConsumer()
            {

                public void consumeLine( final String line )
                {
                    getLogger().warn( line );
View Full Code Here

        }
    }

    protected StreamConsumer createSystemOutStreamConsumer( JarSignerRequest request )
    {
        StreamConsumer systemOut = request.getSystemOutStreamConsumer();

        if ( systemOut == null )
        {

            final boolean verbose = request.isVerbose();

            systemOut = new StreamConsumer()
            {

                /**
                 * {@inheritDoc}
                 */
 
View Full Code Here

        result.setCommandline( cli );

        InputStream systemIn = createSystemInputStream();

        StreamConsumer systemOut = createSystemOutStreamConsumer( request );

        StreamConsumer systemErr = createSystemErrorStreamConsumer( request );

        try
        {
            int resultCode = CommandLineUtils.executeCommandLine( cli, systemIn, systemOut, systemErr );
View Full Code Here

        return result;
    }

    protected StreamConsumer createSystemErrorStreamConsumer( Request request )
    {
        StreamConsumer systemErr = request.getSystemErrorStreamConsumer();

        if ( systemErr == null )
        {
            systemErr = new StreamConsumer()
            {

                /**
                 * {@inheritDoc}
                 */
 
View Full Code Here

        return systemErr;
    }

    protected StreamConsumer createSystemOutStreamConsumer( Request request )
    {
        StreamConsumer systemOut = request.getSystemOutStreamConsumer();

        if ( systemOut == null )
        {

            systemOut = new StreamConsumer()
            {

                /**
                 * {@inheritDoc}
                 */
 
View Full Code Here

            cli.setWorkingDirectory( basedir );

            Writer logWriter = new FileWriter( new File( basedir, LOG_FILENAME ) );

            StreamConsumer out = new WriterStreamConsumer( logWriter );

            StreamConsumer err = new WriterStreamConsumer( logWriter );

            System.out.println( "Command: " + CommandLineUtils.toString( cli.getCommandline() ) );

            int ret = CommandLineUtils.executeCommandLine( cli, out, err );
View Full Code Here

            cmd.createArg().setValue( cliArg );
        }

        Writer logWriter = new FileWriter( logFile );

        StreamConsumer out = new WriterStreamConsumer( logWriter );

        StreamConsumer err = new WriterStreamConsumer( logWriter );

        try
        {
            return CommandLineUtils.executeCommandLine( cmd, out, err );
        }
View Full Code Here

TOP

Related Classes of org.apache.maven.shared.utils.cli.StreamConsumer

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.