Examples of CommandLineException


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

                    }
                }
            }
            catch ( IOException e )
            {
                throw new CommandLineException( "Unexpected error", e );
            }
            return 0;
        }
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
View Full Code Here

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

                    StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                    msg.append( '\n' );
                    msg.append( "Command line was:" + cmdLine );

                    throw new CommandLineException( msg.toString() );
                }
            }
        }
        catch ( CommandLineException e )
        {
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        boolean clientspecExists = consumer.isSuccess();

        // Perform the actual checkout using that clientspec
        try
        {
            if ( clientspecExists )
            {
                try
                {
                    getLastChangelist( prepo, workingDirectory, specname );
                    cl = createCommandLine( prepo, workingDirectory, version, specname );
                    if ( getLogger().isDebugEnabled() )
                    {
                        getLogger().debug( "Executing: " + PerforceScmProvider.clean( cl.toString() ) );
                    }
                    Process proc = cl.execute();
                    BufferedReader br = new BufferedReader( new InputStreamReader( proc.getInputStream() ) );
                    String line;
                    while ( ( line = br.readLine() ) != null )
                    {
                        if ( getLogger().isDebugEnabled() )
                        {
                            getLogger().debug( "Consuming: " + line );
                        }
                        consumer.consumeLine( line );
                    }
                    CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
                    int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

                    if ( exitCode != 0 )
                    {
                        String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                        StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                        msg.append( '\n' );
                        msg.append( "Command line was:" + cmdLine );

                        throw new CommandLineException( msg.toString() );
                    }
                    if ( getLogger().isDebugEnabled() )
                    {
                        getLogger().debug( "Perforce sync complete." );
                    }
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
View Full Code Here

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

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            throw new ScmException( "CommandLineException " + e.getMessage(), e );
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.