Examples of EditScmResult


Examples of org.apache.maven.scm.command.edit.EditScmResult

        DefaultScmRepositoryConfigurator configurator =
            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
        configurator.setScmManager( scmManager );

        ScmProviderStub providerStub = (ScmProviderStub) scmManager.getProviderByUrl( config.getScmSourceUrl() );
        providerStub.setEditScmResult( new EditScmResult( "", "", "", false ) );

        try
        {
            phase.execute( config, new DefaultReleaseEnvironment(), reactorProjects );
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

                throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
            }

            if ( releaseDescriptor.isScmUseEditMode() || provider.requiresEditMode() )
            {
                EditScmResult result = provider.edit( scmRepository, new ScmFileSet(
                    new File( releaseDescriptor.getWorkingDirectory() ), project.getFile() ) );

                if ( !result.isSuccess() )
                {
                    throw new ReleaseScmCommandException( "Unable to enable editing on the POM", result );
                }
            }
        }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

        if ( getLogger().isWarnEnabled() )
        {
            getLogger().warn( "Provider " + this.getScmType() + " does not support edit operation." );
        }

        return new EditScmResult( "", null, null, true );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

    @Override
    public EditScmResult executeEditCommand( ScmProviderRepository repository, ScmFileSet fileSet )
        throws ScmException
    {
        getLogger().info( "Attempting make files writeable in Sandbox " + fileSet.getBasedir().getAbsolutePath() );
        EditScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.makeWriteable();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new EditScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
        {
            ExceptionHandler eh = new ExceptionHandler( aex );
            getLogger().error( "MKS API Exception: " + eh.getMessage() );
            getLogger().info( eh.getCommand() + " exited with return code " + eh.getExitCode() );
            result = new EditScmResult( eh.getCommand(), eh.getMessage(), "Exit Code: " + eh.getExitCode(), false );
        }

        return result;
    }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

                {
                    getLogger().debug( "VSS returns error: [" + error + "] return code: [" + exitCode + "]" );
                }
                if ( error.indexOf( "A writable copy of" ) < 0 )
                {
                    return new EditScmResult( cl.toString(), "The vss command failed.", error, false );
                }
                // print out the writable copy for manual handling
                if ( getLogger().isWarnEnabled() )
                {
                    getLogger().warn( error );
                }
                break;
            }

            sb.append( cl.toString() + '\n' );
            updatedFiles.addAll( consumer.getUpdatedFiles() );

        }
        return new EditScmResult( sb.toString(), updatedFiles );

    }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

            int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );

            if ( exitCode != 0 )
            {
                return new EditScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(), false );
            }
        }
        else
        {
            //edit only interested files already on the local disk
            for ( int i = 0; i < editFiles.size(); ++i )
            {
                ScmFileSet editFile = new ScmFileSet( fileSet.getBasedir(), (File) editFiles.get( i ) );
                Commandline cl = createCommandLine( repository, editFile );

                int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );

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

        return new EditScmResult( null, consumer.getEditedFiles() );

    }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

        JazzScmCommand editCmd = createEditCommand( repo, fileSet );
        int status = editCmd.execute( editConsumer, errConsumer );

        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new EditScmResult( editCmd.getCommandString(), "Error code for Jazz SCM edit command - " + status,
                                      errConsumer.getOutput(), false );
        }

        return new EditScmResult( editCmd.getCommandString(), "Successfully Completed.", editConsumer.getOutput(),
                                  true );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

        setBranchScmResult( new BranchScmResult( "", Collections.<ScmFile>emptyList() ) );
        setChangeLogScmResult( new ChangeLogScmResult( "", "", "", true ) );
        setCheckInScmResult( new CheckInScmResult( "", "", "", true ) );
        setCheckOutScmResult( new CheckOutScmResult( "", "", "", true ) );
        setDiffScmResult( new DiffScmResult( "", "", "", true ) );
        setEditScmResult( new EditScmResult( "", "", "", true ) );
        setExportScmResult( new ExportScmResult( "", "", "", true ) );
        setRemoveScmResult( new RemoveScmResult( "", "", "", true ) );
        setStatusScmResult( new StatusScmResult( "", "", "", true ) );
        setTagScmResult( new TagScmResult( "", "", "", true ) );
        setUnEditScmResult( new UnEditScmResult( "", "", "", true ) );
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

            }
        }

        if ( consumer.isSuccess() )
        {
            return new EditScmResult( cl.toString(), consumer.getEdits() );
        }

        return new EditScmResult( cl.toString(), "Unable to edit file(s)", consumer.getErrorMessage(), false );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.edit.EditScmResult

        try
        {
            ScmRepository repository = getScmRepository();

            EditScmResult result = getScmManager().edit( repository, getFileSet() );

            checkResult( result );
        }
        catch ( IOException 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.