Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmFileSet


    }

    @Override
    public boolean matches( Object argument )
    {
        ScmFileSet fs = (ScmFileSet) argument;
       
        try
        {
            return fs.getBasedir().getCanonicalPath().equals( fileSet.getBasedir().getCanonicalPath() )
                && fs.getFileList().equals( fileSet.getFileList() );
        }
        catch ( IOException e )
        {
            // should not happened so RuntimeException
            throw new RuntimeException(e.getMessage(), e);
View Full Code Here


    }

    private void prepareCheckin( String message )
        throws Exception
    {
        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );
        scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.checkIn( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isNull( ScmVersion.class ),
                                       eq( message ) ) ).thenReturn( new CheckInScmResult( "...", Collections.singletonList( new ScmFile( rootProject
View Full Code Here

        stub.setScmProvider( scmProviderMock );
    }
   
    private void verifyCheckin( String message ) throws Exception
    {
        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );
        verify( scmProviderMock ).checkIn( isA( ScmRepository.class ),
                                           argThat( new IsScmFileSetEquals( fileSet ) ),
                                           isNull( ScmVersion.class ),
                                           eq( message ) );
        verifyNoMoreInteractions( scmProviderMock );
View Full Code Here

            releasePoms.add( ReleaseUtil.getReleasePom( project ) );
        }

        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), releasePoms );

        when( scmProviderMock.add( isA( ScmRepository.class ),
                                   argThat( new IsScmFileSetEquals( fileSet ) ) ) ).
                                       thenReturn( new AddScmResult( "...",
                                                                     Collections.singletonList( new ScmFile( Maven.RELEASE_POMv4, ScmFileStatus.ADDED ) ) ) );
View Full Code Here

            releasePoms.add( ReleaseUtil.getReleasePom( project ) );
        }
       
        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), releasePoms );
       
        verify( scmProviderMock ).add( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ) );
        verifyNoMoreInteractions( scmProviderMock );
    }
View Full Code Here

        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
        descriptor.setWorkingDirectory( getPath (rootProject.getFile().getParentFile() ) );
        descriptor.setScmReleaseLabel( "release-label" );
        descriptor.setScmCommentPrefix( "[my prefix] " );

        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile() );

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.branch( isA( ScmRepository.class ),
                                   argThat( new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
View Full Code Here

        descriptor.setScmSourceUrl( "scm-url" );
        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
        descriptor.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
        descriptor.setScmReleaseLabel( "release-label" );

        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.checkIn( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isNull( ScmVersion.class ),
View Full Code Here

        for ( Iterator<MavenProject> i = reactorProjects.iterator(); i.hasNext(); )
        {
            MavenProject project = i.next();
            poms.add( project.getFile() );
        }
        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), poms);

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.checkIn( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isNull( ScmVersion.class ),
View Full Code Here

        descriptor.setScmSourceUrl( "scm-url" );
        MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
        descriptor.setWorkingDirectory( rootProject.getFile().getParentFile().getAbsolutePath() );
        descriptor.setScmReleaseLabel( "release-label" );

        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.checkIn( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isNull( ScmVersion.class ),
View Full Code Here

        descriptor.setScmReleaseLabel( "release-label" );

        List<File> files = new ArrayList<File>();
        files.add( rootProject.getFile() );
        files.add( ReleaseUtil.getReleasePom( rootProject ) );
        ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), files );

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.checkIn( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       isNull( ScmVersion.class ),
View Full Code Here

TOP

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

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.