Examples of StreamConsumer


Examples of org.codehaus.plexus.util.cli.StreamConsumer

        } catch (Exception e1) {
            throw new MojoExecutionException("Could not create runtime jar", e1);
        }
        cmd.addArguments(args);

        StreamConsumer out = new StreamConsumer() {
            public void consumeLine(String line) {
                getLog().info(line);
            }
        };
        final StringBuilder b = new StringBuilder();
        StreamConsumer err = new StreamConsumer() {
            public void consumeLine(String line) {
                b.append(line);
                b.append("\n");
                getLog().warn(line);
            }
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

            public int read()
            {
                return -1;
            }
        };
        StreamConsumer outConsumer = new StreamConsumer()
        {
            public void consumeLine( String line )
            {
                getLog().info( line );
            }
        };
        final StringBuffer errBuffer = new StringBuffer();
        StreamConsumer errConsumer = new StreamConsumer()
        {
            public void consumeLine( String line )
            {
                errBuffer.append( line );
                getLog().warn( line );
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

        getLog().debug("Executing: " + commandLine );

        LineMatcherStreamConsumer outConsumer = new LineMatcherStreamConsumer( "jar verified." );

        final StringBuffer errBuffer = new StringBuffer();
        StreamConsumer errConsumer = new StreamConsumer()
        {
            public void consumeLine(String line)
            {
                 errBuffer.append( line );
                 getLog().warn( line );
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

                public int read()
                {
                    return -1;
                }

            }, new StreamConsumer()
            {

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

            }, new StreamConsumer()
            {

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

Examples of org.codehaus.plexus.util.cli.StreamConsumer

        commandLine.createArg().setValue( "-cp" );
        commandLine.createArg().setFile( pluginArtifact.getFile() );
        commandLine.createArg().setValue( SystemPropertyPrinter.class.getName() );
        commandLine.createArg().setValue( "java.version" );

        StreamConsumer consumer = new StreamConsumer()
        {
            public void consumeLine( String line )
            {
                setActualJreVersion( line );
            }
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

 
      // Excute command
 
      Writer writer = new FileWriter( outputFile );
 
      StreamConsumer consumer = new WriterStreamConsumer( writer );
 
      int exitCode = CommandLineUtils.executeCommandLine( cmd, consumer, consumer );
 
      writer.flush();
 
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

    private String applyPatches( Map patchesApplied )
        throws MojoExecutionException
    {
        final StringWriter outputWriter = new StringWriter();

        StreamConsumer consumer = new StreamConsumer()
        {
            public void consumeLine( String line )
            {
                if ( getLog().isDebugEnabled() )
                {
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

        cl.addArg(arg);
        arg = new Argument();
        arg.setValue(getPDFFileName());
        cl.addArg(arg);

        StreamConsumer out = new StreamConsumer() {
            public void consumeLine(String line) {
                getLog().info("[prince] " + line);
            }
        };
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

            return;
        }

        Commandline cl = createDeleteLocalCommand( repo, fileSet, version );

        StreamConsumer consumer = new DefaultConsumer();

        CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();

        int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );
View Full Code Here

Examples of org.codehaus.plexus.util.cli.StreamConsumer

        }

        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
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.