Package org.apache.maven.scm.command.list

Examples of org.apache.maven.scm.command.list.ListScmResult


        JazzScmCommand listCmd = createListCommand( jazzRepo, fileSet, recursive, version );
        int status = listCmd.execute( listConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new ListScmResult( listCmd.getCommandString(), "Error code for Jazz SCM list command - " + status,
                                      errConsumer.getOutput(), false );
        }

        return new ListScmResult( listCmd.getCommandString(), listConsumer.getFiles() );
    }
View Full Code Here


        Commandline cl = createCommandLine( repository, fileSet.getBasedir() );

        exitCode = GitCommandLineUtils.execute( cl, consumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new ListScmResult( cl.toString(), "The git-ls-files command failed.", stderr.getOutput(), false );
        }

        return new ListScmResult( cl.toString(), consumer.getListedFiles() );
    }
View Full Code Here

                                                              cl.getWorkingDirectory().getAbsolutePath(), logListener,
                                                              getLogger() );

            if ( !isSuccess )
            {
                return new ListScmResult( cl.toString(), "The cvs command failed.", logListener.getStderr().toString(),
                                          false );
            }
            BufferedReader stream = new BufferedReader(
                new InputStreamReader( new ByteArrayInputStream( logListener.getStdout().toString().getBytes() ) ) );

            String line;

            while ( ( line = stream.readLine() ) != null )
            {
                consumer.consumeLine( line );
            }
        }
        catch ( Exception e )
        {
            e.printStackTrace();
            return new ListScmResult( cl.toString(), "The cvs command failed.", logListener.getStderr().toString(),
                                      false );
        }

        return new ListScmResult( cl.toString(), consumer.getEntries() );
    }
View Full Code Here

   
        assertResultIsSuccess( result );
   
        assertNotNull( result.getRevision() );
   
        ListScmResult listResult = getScmManager().list( getScmRepository(), fileSet, true, null );
   
        assertTrue( "Directory should have been found.", listResult.isSuccess() );
    }
View Full Code Here

   
        assertResultIsSuccess( result );
   
        assertNotNull( result.getRevision() );
   
        ListScmResult listResult = getScmManager().list( getScmRepository(), fileSet, true, null );
       
        assertTrue( "Directory should have been found.", listResult.isSuccess() );
               
        // add the directory again
        result = getScmManager().mkdir( getScmRepository(), fileSet, null, false );
   
        printOutputError( result );
View Full Code Here

        super.execute();

        try
        {
            ScmRepository repository = getScmRepository();
            ListScmResult result = getScmManager().list( repository, getFileSet(), recursive,
                                                         getScmVersion( scmVersionType, scmVersion ) );

            checkResult( result );

            if ( result.getFiles() != null )
            {
                for ( ScmFile scmFile : result.getFiles() )
                {
                    getLog().info( scmFile.getPath() );
                }
            }
        }
View Full Code Here

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

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

        return new ListScmResult( cl.toString(), consumer.getChangedFiles() );

    }
View Full Code Here

        {
            ScmRepository repository = getScmRepository( getRepository().getUrl() );

            ScmProvider provider = getScmProvider( repository.getProvider() );

            ListScmResult result =
                provider.list( repository, new ScmFileSet( new File( "." ), new File( resourcePath ) ), false,
                               makeScmVersion() );

            if ( !result.isSuccess() )
            {
                throw new ResourceDoesNotExistException( result.getProviderMessage() );
            }

            List<String> files = new ArrayList<String>();

            for ( ScmFile f : result.getFiles() )
            {
                files.add( f.getPath() );
            }

            return files;
View Full Code Here

        super.execute();

        try
        {
            ScmRepository repository = getScmRepository();
            ListScmResult result = getScmManager().list( repository, getFileSet(), recursive,
                                                         getScmVersion( scmVersionType, scmVersion ) );

            checkResult( result );

            if ( result.getFiles() != null )
            {
                for ( ScmFile scmFile : result.getFiles() )
                {
                    getLog().info( scmFile.getPath() );
                }
            }
        }
View Full Code Here

            {
                getLogger().debug( ref.getObjectId().getName() + "  " + ref.getTarget().getName() );
                list.add( new ScmFile( ref.getName(), ScmFileStatus.CHECKED_IN ) );
            }

            return new ListScmResult( "JGit ls-remote", list );
        }
        catch ( Exception e )
        {
            throw new ScmException( "JGit ls-remote failure!", e );
        }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.command.list.ListScmResult

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.