Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmTag


            {
                return new ScmRevision( scmVersion );
            }
            else if ( "tag".equals( scmVersionType ) )
            {
                return new ScmTag( scmVersion );
            }
            else if ( "branch".equals( scmVersionType ) )
            {
                return new ScmBranch( scmVersion );
            }
View Full Code Here


        ScmVersion scmVersion = null;
        if ( tag != null )
        {
            // TODO: differentiate between tag and branch? Allow for revision?
            scmVersion = new ScmTag( tag );
        }
        return scmVersion;
    }
View Full Code Here

            {
                String type = args[4];

                if ( "tag".equals( type ) )
                {
                    scmVersion = new ScmTag( version );
                }
                else if ( "branch".equals( type ) )
                {
                    scmVersion = new ScmBranch( version );
                }
View Full Code Here

        assertFalse( "check previous assertion copy deleted", getAssertionCopy().exists() );

        checkoutResult = getScmManager().getProviderByUrl( getScmUrl() ).checkOut( getScmRepository(),
                                                                                   new ScmFileSet( getAssertionCopy() ),
                                                                                   new ScmTag( tag ) );

        assertResultIsSuccess( checkoutResult );

        assertEquals( "check readme.txt contents is from tagged version", "/readme.txt",
                      FileUtils.fileRead( readmeTxt ) );
View Full Code Here

        checkoutDirectory.mkdirs();

        CheckOutScmResult scmResult;

        scmResult = provider.checkOut( repository, new ScmFileSet( checkoutDirectory ),
                                       new ScmTag( releaseDescriptor.getScmReleaseLabel() ) );

        if ( releaseDescriptor.isLocalCheckout() && !scmResult.isSuccess() )
        {
            // this is not beautiful but needed to indicate that the execute() method
            // should continue in the parent directory
View Full Code Here

        checkoutDirectory.mkdirs();

        CheckOutScmResult scmResult;

        scmResult = provider.checkOut( repository, new ScmFileSet( checkoutDirectory ),
                                       new ScmTag( releaseDescriptor.getScmReleaseLabel() ) );

        if ( releaseDescriptor.isLocalCheckout() && !scmResult.isSuccess() )
        {
            // this is not beautiful but needed to indicate that the execute() method
            // should continue in the parent directory
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public String translateTagUrl( String url, String tag, String tagBase )
    {
        return SvnTagBranchUtils.resolveUrl( url, tagBase, SvnTagBranchUtils.SVN_TAGS, new ScmTag( tag ) );
    }
View Full Code Here

    }

    @Override
    public boolean matches( Object argument )
    {
        ScmTag tag = (ScmTag) argument;

        return tag.getName().equals( this.tag.getName() );
    }
View Full Code Here

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        SvnScmProviderRepository scmProviderRepository = new SvnScmProviderRepository( sourceUrl );
        ScmRepository repository = new ScmRepository( "svn", scmProviderRepository );
        when( scmProviderMock.checkOut( eq( repository),
                                        argThat( new IsScmFileSetEquals( new ScmFileSet( checkoutDirectory ) ) ),
                                        argThat( new IsScmTagEquals( new ScmTag( "release-label" ) ) ) ) ).thenReturn( new CheckOutScmResult( "", null ) );

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

        List<MavenProject> reactorProjects = createReactorProjects( "scm-commit", "/single-pom" );
       
        // execute
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );

        // prepare
        assertEquals( "", descriptor.getScmRelativePathProjectDirectory() );
       
        verify( scmProviderMock ).checkOut( eq( repository),
                                            argThat( new IsScmFileSetEquals( new ScmFileSet( checkoutDirectory ) ) ),
                                            argThat( new IsScmTagEquals( new ScmTag( "release-label" ) ) ) );
        verifyNoMoreInteractions( scmProviderMock );
    }
View Full Code Here

        ScmProvider scmProviderMock = mock( ScmProvider.class );
        SvnScmProviderRepository scmProviderRepository = new SvnScmProviderRepository( sourceUrl );
        ScmRepository repository = new ScmRepository( "svn", scmProviderRepository );
        when( scmProviderMock.checkOut( eq( repository ),
                                        argThat( new IsScmFileSetEquals( new ScmFileSet( checkoutDirectory ) ) ),
                                        argThat( new IsScmTagEquals( new ScmTag( "release-label" ) ) ) ) ).thenReturn( new CheckOutScmResult( "", null ) );

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

        List<MavenProject> reactorProjects = createReactorProjects( "scm-commit", "/multimodule-with-deep-subprojects" );
       
        // execute
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );

        // verify
        assertEquals( "", descriptor.getScmRelativePathProjectDirectory() );
       
        verify( scmProviderMock ).checkOut( eq( repository ),
                                            argThat( new IsScmFileSetEquals( new ScmFileSet( checkoutDirectory ) ) ),
                                            argThat( new IsScmTagEquals( new ScmTag( "release-label" ) ) ) );
        verifyNoMoreInteractions( scmProviderMock );
    }
View Full Code Here

TOP

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

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.