Examples of AddScmResult


Examples of org.apache.maven.scm.command.add.AddScmResult

        int exitCode = GitCommandLineUtils.execute( cl, stdout, stderr, getLogger() );

        if ( exitCode != 0 )
        {
            return new AddScmResult( cl.toString(), "The git-add command failed.", stderr.getOutput(), false );
        }

        return null;
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

                                                              getLogger() );

            // TODO: actually it may have partially succeeded - should we cvs update the files and parse "A " responses?
            if ( !isSuccess )
            {
                return new AddScmResult( cl.toString(), "The cvs command failed.", logListener.getStdout().toString(),
                                         false );
            }

            return new AddScmResult( cl.toString(), addedFiles );
        }
        catch ( Exception e )
        {
            e.printStackTrace();
            return new AddScmResult( cl.toString(), "The cvs command failed.", logListener.getStdout().toString(),
                                     false );
        }
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

        try
        {
            ScmRepository repository = getScmRepository();

            AddScmResult result = getScmManager().add( repository, getFileSet() );

            checkResult( result );

            getLog().info( "" + result.getAddedFiles().size() + " files successfully added." );

        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "Cannot run add command : ", e );
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

        File workingDir = fileSet.getBasedir();
        BazaarAddConsumer consumer = new BazaarAddConsumer( getLogger(), workingDir );
        ScmResult result = BazaarUtils.execute( consumer, getLogger(), workingDir, addCmd );

        return new AddScmResult( consumer.getAddedFiles(), result );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new AddScmResult( cl.toString(), consumer.getAdditions() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

        List<File> addedFiles = accuRev.add( basedir, relativeFiles, message );

        if ( addedFiles != null )
        {
            List<ScmFile> resultFiles = getScmFiles( addedFiles, ScmFileStatus.ADDED );
            return new AddScmResult( accuRev.getCommandLines(), resultFiles );
        }
        else
        {
            return new AddScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
        }
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

        List<ScmFile> scmFiles = new ArrayList<ScmFile>( fileSet.getFileList().size() );
        for ( File f : fileSet.getFileList() )
        {
            scmFiles.add( new ScmFile( f.getPath(), ScmFileStatus.ADDED ) );
        }
        return new AddScmResult( "", scmFiles );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

        ErrorStreamConsumer err = new ErrorStreamConsumer();

        int status = command.execute( fileConsumer, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new AddScmResult( command.getCommandString(), "Error code for TFS add command - " + status,
                                     err.getOutput(), false );
        }
       
        return new AddScmResult( command.getCommandString(), fileConsumer.getFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

        throws ScmException
    {
        // Call the Add command to perform the checkin into the repository workspace.
        JazzAddCommand addCommand = new JazzAddCommand();
        addCommand.setLogger( getLogger() );
        AddScmResult addResult = addCommand.executeAddCommand( repo, fileSet );

        // Now, if it has a flow target, deliver it.
        JazzScmProviderRepository jazzRepo = (JazzScmProviderRepository) repo;
        if ( jazzRepo.isPushChangesAndHaveFlowTargets() )
        {
            // Push if we need too
            JazzScmCommand deliverCmd = createDeliverCommand( (JazzScmProviderRepository) repo, fileSet );
            StreamConsumer deliverConsumer =
                new DebugLoggerConsumer( getLogger() );      // No need for a dedicated consumer for this
            ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

            int status = deliverCmd.execute( deliverConsumer, errConsumer );
            if ( status != 0 || errConsumer.hasBeenFed() )
            {
                return new CheckInScmResult( deliverCmd.getCommandString(),
                                             "Error code for Jazz SCM deliver command - " + status,
                                             errConsumer.getOutput(), false );
            }
        }

        // Return what was added.
        return new CheckInScmResult( addResult.getCommandLine(), addResult.getAddedFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.add.AddScmResult

       
        AccuRevAddCommand command = new AccuRevAddCommand( getLogger() );

        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setString( CommandParameter.MESSAGE, "A new file" );
        AddScmResult result = command.add( repo, testFileSet, commandParameters );

        assertThat( result.isSuccess(), is( true ) );
        assertThat( result.getAddedFiles().size(), is( 1 ) );
        assertHasScmFile( result.getAddedFiles(), "added/file", ScmFileStatus.ADDED );
    }
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.