Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmException


        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
        releaseDescriptor.setScmSourceUrl( "scm-url" );
        releaseDescriptor.setWorkingDirectory( getTestFile( "target/test/checkout" ).getAbsolutePath() );

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.status( isA( ScmRepository.class ), isA( ScmFileSet.class ) ) ).thenThrow( new ScmException( "..." ) );

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );

        // execute
View Full Code Here


        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( isA( ScmRepository.class ),
                                   isA( ScmFileSet.class ),
                                   isA( String.class ),
                                   isA( ScmTagParameters.class ) ) ).thenThrow( new ScmException( "..." ) );

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );

        // execute
View Full Code Here

        ReleaseDescriptor config = createDescriptorFromBasicPom( reactorProjects );
        config.setScmUseEditMode( true );
        mapNextVersion( config, "groupId:artifactId" );

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.edit( isA( ScmRepository.class ), isA( ScmFileSet.class) ) ).thenThrow( new ScmException( "..." ) );

        ScmManagerStub scmManager = new ScmManagerStub();
        DefaultScmRepositoryConfigurator configurator =
            (DefaultScmRepositoryConfigurator) lookup( ScmRepositoryConfigurator.ROLE );
        configurator.setScmManager( scmManager );
View Full Code Here

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.checkIn( isA( ScmRepository.class ),
                                       isA( ScmFileSet.class ),
                                       isNull( ScmVersion.class ),
                                       isA( String.class ) ) ).thenThrow( new ScmException( "..." ) );

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );

        // execute
View Full Code Here

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.branch( isA( ScmRepository.class ),
                                   isA( ScmFileSet.class ),
                                   isA( String.class ),
                                   isA( ScmBranchParameters.class ) ) ).thenThrow( new ScmException( "..." ) );

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );

        // execute
View Full Code Here

    {
        LoginScmResult result = login( repository.getProviderRepository(), fileSet, new CommandParameters() );

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Can't login.\n" + result.getCommandOutput() );
        }
    }
View Full Code Here

        {
            return executeCommand( repository, fileSet, parameters );
        }
        catch ( Exception ex )
        {
            throw new ScmException( "Exception while executing SCM command.", ex );
        }
    }
View Full Code Here

    protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
                                                          ScmVersion startVersion, ScmVersion endVersion,
                                                          String datePattern )
        throws ScmException
    {
        throw new ScmException( "Unsupported method for this provider." );
    }
View Full Code Here

        }
        else
        {
            if ( numDays != 0 && ( startDate != null || endDate != null ) )
            {
                throw new ScmException( "Start or end date cannot be set if num days is set." );
            }

            if ( endDate != null && startDate == null )
            {
                throw new ScmException( "The end date is set but the start date isn't." );
            }

            if ( numDays > 0 )
            {
                int day = 24 * 60 * 60 * 1000;
 
View Full Code Here

    }

    protected ChangeLogScmResult executeChangeLogCommand( ChangeLogScmRequest request )
        throws ScmException
    {
        throw new ScmException( "Unsupported method for this provider." );
    }
View Full Code Here

TOP

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

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.