Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmTagParameters


   
    protected ScmResult executeTagCommand( ScmProviderRepository repository, ScmFileSet fileSet, String tag,
                                           String message )
        throws ScmException
    {
        return executeTagCommand( repository, fileSet, tag, new ScmTagParameters( message ) );
    }
View Full Code Here


{

    protected ScmResult executeTagCommand( ScmProviderRepository r, ScmFileSet f, String tag, String message )
        throws ScmException
    {
        return executeTagCommand( r, f, tag, new ScmTagParameters( message ) );
    }
View Full Code Here

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( isA( ScmRepository.class ),
                                   argThat( new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat( new IsScmTagParamtersEquals( 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
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );

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

        ScmRepository repository = new ScmRepository( "svn", scmProviderRepository );
        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( eq( repository ),
                                   argThat(new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat(new IsScmTagParamtersEquals( 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 );

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

        ScmRepository repository = new ScmRepository( "svn", scmProviderRepository );
        ScmProvider scmProviderMock = mock( ScmProvider.class );
        when( scmProviderMock.tag( eq( repository ),
                                   argThat( new IsScmFileSetEquals( fileSet ) ),
                                   eq( "release-label" ),
                                   argThat( new IsScmTagParamtersEquals( 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 );
        stub.addScmRepositoryForUrl( "scm:svn:" + scmUrl, repository );

        // execute
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );
       
        // verify
        verify( scmProviderMock ).tag( eq( repository ),
                                       argThat( new IsScmFileSetEquals( fileSet ) ),
                                       eq( "release-label" ),
                                       argThat( new IsScmTagParamtersEquals( new ScmTagParameters( "[my prefix] copy for tag release-label" ) ) ) );
        verifyNoMoreInteractions( 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 IsScmTagParamtersEquals( 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 );

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

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

        try
        {
            // TODO: want includes/excludes?
            ScmFileSet fileSet = new ScmFileSet( new File( basedirAlignedReleaseDescriptor.getWorkingDirectory() ) );
            String tagName = releaseDescriptor.getScmReleaseLabel();
            ScmTagParameters scmTagParameters =
                new ScmTagParameters( releaseDescriptor.getScmCommentPrefix() + " copy for tag " + tagName );
            scmTagParameters.setRemoteTagging( releaseDescriptor.isRemoteTagging() );
            scmTagParameters.setScmRevision( releaseDescriptor.getScmReleasedPomRevision() );
            if ( getLogger().isDebugEnabled() )
            {
                getLogger().debug(
                    "ScmTagPhase :: scmTagParameters remotingTag " + releaseDescriptor.isRemoteTagging() );
                getLogger().debug(
View Full Code Here

    }

    @Override
    public boolean matches( Object argument )
    {
        ScmTagParameters stp = (ScmTagParameters) argument;
        return stp.getMessage().equals( this.scmTagParameters.getMessage() )
            && stp.isRemoteTagging() == this.scmTagParameters.isRemoteTagging();
    }
View Full Code Here

   
    protected ScmResult executeTagCommand( ScmProviderRepository scmProviderRepository, ScmFileSet fileSet, String tag,
                                           String message )
        throws ScmException
    {
        return executeTagCommand( scmProviderRepository, fileSet, tag, new ScmTagParameters( message ) );
    }
View Full Code Here

        throws Exception
    {
        File messageFile = File.createTempFile( "maven-scm", "commit" );
        messageFile.deleteOnExit();

        ScmTagParameters scmTagParameters = new ScmTagParameters();
        scmTagParameters.setRemoteTagging( true );
        scmTagParameters.setScmRevision( "12" );
        testCommandLine( "scm:svn:https://foo.com/svn/trunk", "svntag", messageFile, "user",
                         "svn --username user --no-auth-cache --non-interactive copy --file " + messageFile.getAbsolutePath()
                             + " --revision 12 https://foo.com/svn/trunk https://foo.com/svn/tags/svntag",
                         scmTagParameters );
    }   
View Full Code Here

TOP

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

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.