Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmFile


        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( eq( repository ),
                                   argThat(new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat(new IsScmTagParametersEquals( new ScmTagParameters( "[my prefix] copy for tag release-label" ) ) ) ) ).
                                       thenReturnnew TagScmResult( "...", Collections.singletonList( new ScmFile( getPath (rootProject
                                                                                                                              .getFile() ), ScmFileStatus.TAGGED ) ) ) ) ;

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );
        stub.addScmRepositoryForUrl( scmUrl, repository );
View Full Code Here


                                   argThat( new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat( new IsScmTagParametersEquals( new ScmTagParameters(
                                           "[my prefix] copy for tag release-label" ) ) ) ) ).thenReturn( new TagScmResult(
                                                "...",
                                                Collections.singletonList( new ScmFile(
                                                                                        getPath( rootProject.getFile() ),
                                                                                        ScmFileStatus.TAGGED ) ) ) );

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

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( isA( ScmRepository.class ),
                                   argThat( new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat( new IsScmTagParametersEquals( new ScmTagParameters( "[my prefix] copy for tag release-label" ) ) ) ) ).thenReturn( new TagScmResult( "...", Collections.singletonList( new ScmFile( getPath( rootProject
                       .getFile() ), ScmFileStatus.TAGGED ) ) ) );

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

            ScmTranslator scmTranslator = scmTranslators.get( repository.getProvider() );
           
            // TODO: would be nice for SCM status command to do this for me.
            for ( Iterator<ScmFile> i = changedFiles.iterator(); i.hasNext(); )
            {
                ScmFile f = i.next();

                String path;
                if ( scmTranslator != null )
                {
                    path = scmTranslator.toRelativePath( f.getPath() );
                }
                else
                {
                    path = f.getPath();
                }

                // SelectorUtils expects File.separator, don't standardize!
                String fileName = path.replace( "\\", File.separator ).replace( "/", File.separator );
View Full Code Here

                else
                {
                    throw new IOException( "Cannot commit to non-existing location: " + srcFile + " -> " + dstFile );
                }

                checkedInFiles.add( new ScmFile( path, ScmFileStatus.CHECKED_IN ) );
            }
        }
        catch ( IOException e )
        {
            throw new ScmException( "Error while checking in the files.", e );
View Full Code Here

                else
                {
                    throw new IOException( "Cannot tag non-existing file: " + srcFile );
                }

                taggedFiles.add( new ScmFile( path, ScmFileStatus.TAGGED ) );
            }
        }
        catch ( IOException e )
        {
            throw new ScmException( "Error while tagging the files.", e );
View Full Code Here

                else
                {
                    throw new IOException( "Cannot check out non-existing file: " + srcFile );
                }

                checkedOutFiles.add( new ScmFile( path, ScmFileStatus.CHECKED_OUT ) );
            }
        }
        catch ( IOException e )
        {
            throw new ScmException( "Error while checking out the files.", e );
View Full Code Here

    {
        List<ScmFile> files = new ArrayList<ScmFile>( changedFiles.size() );
        for ( Iterator<String> i = changedFiles.iterator(); i.hasNext(); )
        {
            String fileName = i.next();
            files.add( new ScmFile( fileName, ScmFileStatus.MODIFIED ) );
        }
        return files;
    }
View Full Code Here

        when( scmProviderMock.tag( isA( ScmRepository.class ),
                                   argThat( new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat( new IsScmTagParametersEquals( new ScmTagParameters( "[my prefix] copy for tag release-label" ) ) ) ) ).
                                   thenReturn( new TagScmResult( "...",
                                                                 Collections.singletonList( new ScmFile( getPath (rootProject
                                                                                                                  .getFile() ), ScmFileStatus.TAGGED ) ) ) );
        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );

        // execute
View Full Code Here

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( eq( repository ),
                                   argThat(new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat(new IsScmTagParametersEquals( new ScmTagParameters( "[my prefix] copy for tag release-label" ) ) ) ) ).
                                       thenReturnnew TagScmResult( "...", Collections.singletonList( new ScmFile( getPath (rootProject
                                                                                                                              .getFile() ), ScmFileStatus.TAGGED ) ) ) ) ;

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );
        stub.addScmRepositoryForUrl( scmUrl, repository );
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.ScmFile

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.