Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmBranchParameters


    /** {@inheritDoc} */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
        throws ScmException
    {
        ScmBranchParameters scmBranchParameters = new ScmBranchParameters( "" );
        return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName, scmBranchParameters );
    }
View Full Code Here


    /** {@inheritDoc} */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
        throws ScmException
    {
        ScmBranchParameters scmBranchParameters = new ScmBranchParameters( message );
        return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName, scmBranchParameters );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
        throws ScmException
    {
        return branch( repository, fileSet, branchName, new ScmBranchParameters() );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
        throws ScmException
    {
        ScmBranchParameters scmBranchParameters = new ScmBranchParameters();

        if ( StringUtils.isNotEmpty( message ) )
        {
            scmBranchParameters.setMessage( message );
        }

        return branch( repository, fileSet, branchName, scmBranchParameters );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
        throws ScmException
    {
        ScmBranchParameters scmBranchParameters = new ScmBranchParameters( "" );
        return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName,
                                                                  scmBranchParameters );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
        throws ScmException
    {
        ScmBranchParameters scmBranchParameters = new ScmBranchParameters( message );
        return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName,
                                                                  scmBranchParameters );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
        throws ScmException
    {
        return branch( repository, fileSet, branchName, new ScmBranchParameters() );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
        throws ScmException
    {
        ScmBranchParameters scmBranchParameters = new ScmBranchParameters();

        if ( StringUtils.isNotEmpty( message ) )
        {
            scmBranchParameters.setMessage( message );
        }

        return branch( repository, fileSet, branchName, scmBranchParameters );
    }
View Full Code Here

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

        // execute
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );

        // verify
        verify( scmProviderMock ).branch( isA( ScmRepository.class ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       eq( "release-label" ),
                                       argThat( new IsScmBranchParametersEquals( new ScmBranchParameters( "[my prefix] copy for branch release-label" ) ) ) );
        verifyNoMoreInteractions( scmProviderMock );
    }
View Full Code Here

        ScmRepository repository = new ScmRepository( "svn", scmProviderRepository );
        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.branch( eq( repository ),
                                   argThat(new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat(new IsScmBranchParametersEquals( new ScmBranchParameters( "[my prefix] copy for branch release-label" ) ) ) ) ).
                                       thenReturnnew BranchScmResult( "...", Collections.singletonList( new ScmFile( getPath (rootProject
                                                                                                                              .getFile() ), ScmFileStatus.TAGGED ) ) ) ) ;

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

        // execute
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );
       
        // verify
        verify( scmProviderMock ).branch( eq( repository ),
                                       argThat(new IsScmFileSetEquals( fileSet ) ),
                                       eq( "release-label" ),
                                       argThat(new IsScmBranchParametersEquals( new ScmBranchParameters( "[my prefix] copy for branch release-label" ) ) ) );
        verifyNoMoreInteractions( scmProviderMock );
    }
View Full Code Here

TOP

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

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.