Examples of RemoveScmResult


Examples of org.apache.maven.scm.command.remove.RemoveScmResult

        }

        // TODO: actually it may have partially succeeded - should we cvs update the files and parse "A " responses?
        if ( exitCode != 0 )
        {
            return new RemoveScmResult( cl.toString(), "The cvs command failed.", stderr.getOutput(), false );
        }

        return new RemoveScmResult( cl.toString(), removedFiles );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

        Constraint[] arguments = new Constraint[] { new IsAnything(), new IsScmFileSetEquals( fileSet ), new IsAnything() };
        scmProviderMock
            .expects( new InvokeOnceMatcher() )
            .method( "remove" )
            .with( arguments )
            .will( new ReturnStub( new RemoveScmResult( "...", Collections
                       .singletonList( new ScmFile( Maven.RELEASE_POMv4, ScmFileStatus.DELETED ) ) ) ) );

       
       
        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

        Constraint[] arguments = new Constraint[] { new IsAnything(), new IsScmFileSetEquals( fileSet ), new IsAnything() };
        scmProviderMock
            .expects( new InvokeOnceMatcher() )
            .method( "remove" )
            .with( arguments )
            .will( new ReturnStub( new RemoveScmResult( "...", Collections
                       .singletonList( new ScmFile( Maven.RELEASE_POMv4, ScmFileStatus.DELETED ) ) ) ) );

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( (ScmProvider) scmProviderMock.proxy() );
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

    {
        super.execute();
        try
        {
            ScmRepository repository = getScmRepository();
            RemoveScmResult result = getScmManager().remove( repository, getFileSet(), message );
            checkResult( result );
        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "Cannot run remove command : " + e.getMessage(), e );
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

            commitFile = commitFile.getParentFile();
        }

        try {
            ScmFileSet deleteFileSet = new ScmFileSet(enclosingDirectory, hierarchyToDelete);
            RemoveScmResult removeResult = this.scmManager.remove(this.scmRepository, deleteFileSet, "");
            if(!removeResult.isSuccess()){
                LOGGER.severe("[deleteHierarchy] Problem during remove : "+removeResult.getProviderMessage());
                return null;
            }

            List<File> filesToCommit = new ArrayList<File>();
            filesToCommit.add(commitFile);
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

        final List<File> removedFiles = accuRev.defunct( basedir, relativeFiles, message );

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

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

    @Override
    public RemoveScmResult executeRemoveCommand( ScmProviderRepository repository, ScmFileSet fileSet, String message )
        throws ScmException
    {
        getLogger().info( "Attempting to un-register sandbox in directory " + fileSet.getBasedir().getAbsolutePath() );
        RemoveScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.drop();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new RemoveScmResult( 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 RemoveScmResult( eh.getCommand(), eh.getMessage(), "Exit Code: " + eh.getExitCode(), false );
        }

        return result;
    }
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

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

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

        return new RemoveScmResult( cl.toString(), consumer.getRemovedFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

        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 ) );
        setUpdateScmResult( new UpdateScmResult( "", "", "", true ) );
        setBlameScmResult( new BlameScmResult( "", "", "", true ) );
View Full Code Here

Examples of org.apache.maven.scm.command.remove.RemoveScmResult

            ScmFileSet scmFileSet = new ScmFileSet( new File( releaseDescriptor.getWorkingDirectory() ), releasePoms );

            try
            {
                RemoveScmResult scmResult =
                    scmProvider.remove( scmRepository, scmFileSet, "Removing for next development iteration." );

                if ( !scmResult.isSuccess() )
                {
                    throw new ReleaseScmCommandException( "Cannot remove release POMs from SCM", scmResult );
                }
            }
            catch ( ScmException exception )
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.