Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmTag


        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( "rewrite-for-release/pom-with-parent-flat", "/root-project" );
       
        // execute
        phase.execute( descriptor, new DefaultReleaseEnvironment(), reactorProjects );

        // verify
        assertEquals( "not found root-project but " + descriptor.getScmRelativePathProjectDirectory(), "root-project",
                      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


            return new ScmBranch( version );
        }

        if ( "tag".equals( versionType ) )
        {
            return new ScmTag( version );
        }

        if ( "revision".equals( versionType ) )
        {
            return new ScmRevision( 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

                    throw new SAXException( "Can't parse end date '" + end + "'.", e );
                }
            }

            bufSet = new ChangeLogSet( bufEntries, startDate, endDate );
            bufSet.setStartVersion( new ScmTag( attributes.getValue( "startTag" ) ) );
            bufSet.setEndVersion( new ScmTag( attributes.getValue( "endTag" ) ) );
        }
    }
View Full Code Here

    extends ScmTestCase
{
    public void testCommandLineWithEmptyTag()
        throws Exception
    {
        testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmTag( "" ),
                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
    }
View Full Code Here

    }

    public void testCommandLineWithWhitespaceTag()
        throws Exception
    {
        testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmTag( "  " ),
                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
    }
View Full Code Here

    }

    public void testCommandLineWithBranchSameAsBase()
        throws Exception
    {
        testCommandLine( "scm:svn:http://foo.com/svn/tags/my-tag", new ScmTag( "tags/my-tag" ),
                         "svn --non-interactive switch http://foo.com/svn/tags/my-tag " +
                             getUpdateTestFile().getAbsolutePath() );
    }
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

        cl.createArg().setValue( messageFile.getAbsolutePath() );

        cl.createArg().setValue( "." );

        // Note: this currently assumes you have the tag base checked out too
        String tagUrl = SvnTagBranchUtils.resolveTagUrl( repository, new ScmTag( tag ) );
        cl.createArg().setValue( SvnCommandUtils.fixUrl( tagUrl, repository.getUser() ) );

        return cl;
    }
View Full Code Here

        String mavenUrl = "scm:starteam:" + starteamUrl;

        String expectedCmd = "stcmd co -x -nologo -stop" + " -p " + starteamUrl + " -fp " + workDirAbsolutePath +
            " -is -merge -neverprompt -vl myTag -eol on";

        testCommandLine( mavenUrl, workingCopy, new ScmTag( "myTag" ), expectedCmd );

    }
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.