Package org.apache.maven.scm.command.checkout

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult


                }
            }

            if ( consumer.isSuccess() )
            {
                return new CheckOutScmResult( cl.toString(), consumer.getCheckedout() );
            }
            else
            {
                return new CheckOutScmResult( cl.toString(), "Unable to sync.  Are you logged in?",
                                              consumer.getOutput(), consumer.isSuccess() );
            }
        }
        finally
        {
View Full Code Here


    {

        AccuRev accuRev = repository.getAccuRev();
        if ( scmFiles != null )
        {
            return new CheckOutScmResult( accuRev.getCommandLines(), scmFiles, repository.getProjectPath() );
        }
        else
        {
            return new CheckOutScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
        }
    }
View Full Code Here

            throw new ScmException( "Error while deleting working directory.", ex );
        }

        if ( exitCode != 0 )
        {
            return new CheckOutScmResult( cl.toString(), "The cleartool command failed.", stderr.getOutput(), false );
        }

        return new CheckOutScmResult( cl.toString(), consumer.getCheckedOutFiles(), projectDirectory );
    }
View Full Code Here

        ScmResult result = BazaarUtils.execute( consumer, getLogger(), checkoutDir, inventoryCmd );
        if ( !result.isSuccess() )
        {
            throw new ScmException( result.getProviderMessage() );
        }
        return new CheckOutScmResult( consumer.getCheckedOutFiles(), result );
    }
View Full Code Here

            command.addArgument( url );
            command.addArgument( f.getBasedir().getAbsolutePath() );
            status = command.execute( out, err );
            if ( status != 0 || err.hasBeenFed() )
            {
                return new CheckOutScmResult( command.getCommandString(),
                                              "Error code for TFS checkout (workfold map) command - " + status,
                                              err.getOutput(), false );
            }
        }
        FileListConsumer fileConsumer = new FileListConsumer();
        err = new ErrorStreamConsumer();
        command = createGetCommand( r, f, v, recursive );
        status = command.execute( fileConsumer, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new CheckOutScmResult( command.getCommandString(), "Error code for TFS checkout (get) command - "
                + status, err.getOutput(), false );
        }
       
        return new CheckOutScmResult( command.getCommandString(), fileConsumer.getFiles() );
    }
View Full Code Here

        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        int status = checkoutCmd.execute( checkoutConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new CheckOutScmResult( checkoutCmd.getCommandString(),
                                          "Error code for Jazz SCM checkout (load) command - " + status,
                                          errConsumer.getOutput(), false );
        }

        return new CheckOutScmResult( checkoutCmd.getCommandString(), checkoutConsumer.getCheckedOutFiles() );
    }
View Full Code Here

            throw new ScmException( "Error while executing command.", ex );
        }

        if ( exitCode != 0 )
        {
            return new CheckOutScmResult( cl.toString(), "The cvs command failed.", stderr.getOutput(), false );
        }

        return new CheckOutScmResult( cl.toString(), consumer.getCheckedOutFiles() );

    }
View Full Code Here

        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "checkout command end successfully ..." );
        }

        return new CheckOutScmResult( files, new ScmResult( "multiple commandline", "OK", "OK", true ) );
    }
View Full Code Here

            String tag = config.getTag();
            getLogger().info( "Checking out project: '" + project.getName() + "', id: '" + project.getId() + "' " +
                "to '" + workingDirectory + "'" + ( tag != null ? " with branch/tag " + tag + "." : "." ) );

            CheckOutScmResult checkoutResult = scm.checkout( config );
            //if ( StringUtils.isNotEmpty( checkoutResult.getRelativePathProjectDirectory() ) )
            //{
            //    context.put( AbstractContinuumAction.KEY_PROJECT_RELATIVE_PATH,
            //                 checkoutResult.getRelativePathProjectDirectory() );
            //}

            if ( !checkoutResult.isSuccess() )
            {
                // TODO: is it more appropriate to return this in the converted result so that it can be presented to
                // the user?
                String msg = "Error while checking out the code for project: '" + project.getName() + "', id: '" +
                    project.getId() + "' to '" + workingDirectory.getAbsolutePath() + "'" +
                    ( tag != null ? " with branch/tag " + tag + "." : "." );
                getLogger().warn( msg );

                getLogger().warn( "Command output: " + checkoutResult.getCommandOutput() );

                getLogger().warn( "Provider message: " + checkoutResult.getProviderMessage() );
            }
            else
            {
                getLogger().info( "Checked out " + checkoutResult.getCheckedOutFiles().size() + " files." );
            }

            result = convertScmResult( checkoutResult );
        }
        catch ( ScmRepositoryException e )
View Full Code Here

            String tag = config.getTag();
            getLogger().info( "Checking out project: '" + project.getName() + "', id: '" + project.getId() + "' " +
                "to '" + workingDirectory + "'" + ( tag != null ? " with branch/tag " + tag + "." : "." ) );

            CheckOutScmResult checkoutResult = scm.checkout( config );
            if ( StringUtils.isNotEmpty( checkoutResult.getRelativePathProjectDirectory() ) )
            {
                context.put( AbstractContinuumAction.KEY_PROJECT_RELATIVE_PATH,
                             checkoutResult.getRelativePathProjectDirectory() );
            }

            if ( !checkoutResult.isSuccess() )
            {
                // TODO: is it more appropriate to return this in the converted result so that it can be presented to
                // the user?
                String msg = "Error while checking out the code for project: '" + project.getName() + "', id: '" +
                    project.getId() + "' to '" + workingDirectory.getAbsolutePath() + "'" +
                    ( tag != null ? " with branch/tag " + tag + "." : "." );
                getLogger().warn( msg );

                getLogger().warn( "Command output: " + checkoutResult.getCommandOutput() );

                getLogger().warn( "Provider message: " + checkoutResult.getProviderMessage() );
            }
            else
            {
                getLogger().info( "Checked out " + checkoutResult.getCheckedOutFiles().size() + " files." );
            }

            result = convertScmResult( checkoutResult );
        }
        catch ( ScmRepositoryException e )
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.command.checkout.CheckOutScmResult

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.