Package org.apache.maven.scm.provider.svn.repository

Examples of org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository


            result.messages.add( url + " url isn't a valid svn URL." );

            return result;
        }

        result.repository = new SvnScmProviderRepository( url );

        return result;
    }
View Full Code Here


                }
            }

            if ( !StringUtils.isEmpty( tagBase ) && repository.getProvider().equals( "svn" ) )
            {
                SvnScmProviderRepository svnRepo = (SvnScmProviderRepository) repository.getProviderRepository();

                svnRepo.setTagBase( tagBase );
            }
        }
        catch ( ScmRepositoryException e )
        {
            if ( !e.getValidationMessages().isEmpty() )
View Full Code Here

        if ( !fileSet.getFileList().isEmpty() )
        {
            throw new ScmException( "This provider doesn't support tagging subsets of a directory" );
        }

        SvnScmProviderRepository repository = (SvnScmProviderRepository) repo;

        File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );

        try
        {
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean containsFilename( String filename, ScmProviderRepository repository )
    {
        SvnScmProviderRepository repo = (SvnScmProviderRepository) repository;

        String url = repo.getUrl();

        if ( !url.endsWith( "/" ) )
        {
            url += "/";
        }
View Full Code Here

    public void testResolveUrlWithQuery()
        throws Exception
    {
        String url = "https://myserver/plugins/scmsvn/viewcvs.php/pom/trunk?root=myproj";

        SvnScmProviderRepository repo = new SvnScmProviderRepository( url );

        assertEquals( "https://myserver/plugins/scmsvn/viewcvs.php/pom/trunk/tags/mytag-1?root=myproj",
                      SvnTagBranchUtils.resolveTagUrl( repo, new ScmTag( "mytag-1" ) ) );
    }
View Full Code Here

    }

    private void testResolveTagUrl( String scmUrl, String tagBase, String tag, String expected )
        throws Exception
    {
        SvnScmProviderRepository repository = getSvnRepository( scmUrl );

        if ( tagBase != null )
        {
            repository.setTagBase( tagBase );
        }

        if ( tagBase != null )
        {
            assertEquals( repository.getTagBase(), tagBase );
        }
        else
        {
            assertEquals( repository.getTagBase(), SvnTagBranchUtils.resolveTagBase( repository.getUrl() ) );
        }

        assertEquals( expected, SvnTagBranchUtils.resolveTagUrl( repository, new ScmTag( tag ) ) );
    }
View Full Code Here

    }

    private void testResolveBranchUrl( String scmUrl, String branchBase, String branch, String expected )
        throws Exception
    {
        SvnScmProviderRepository repository = getSvnRepository( scmUrl );
        if ( branchBase != null )
        {
            repository.setBranchBase( branchBase );
        }

        if ( branchBase != null )
        {
            assertEquals( repository.getBranchBase(), branchBase );
        }
        else
        {
            assertEquals( repository.getBranchBase(), SvnTagBranchUtils.resolveBranchBase( repository.getUrl() ) );
        }

        assertEquals( expected, SvnTagBranchUtils.resolveBranchUrl( repository, new ScmBranch( branch ) ) );
    }
View Full Code Here

    /** {@inheritDoc} */
    protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repo, ScmFileSet fileSet,
                                                        ScmVersion version, boolean recursive )
        throws ScmException
    {
        SvnScmProviderRepository repository = (SvnScmProviderRepository) repo;

        String url = repository.getUrl();

        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
        {
            if ( version instanceof ScmTag )
            {
                url = SvnTagBranchUtils.resolveTagUrl( repository, (ScmTag) version );
            }
            else if ( version instanceof ScmBranch )
            {
                url = SvnTagBranchUtils.resolveBranchUrl( repository, (ScmBranch) version );
            }
        }

        url = SvnCommandUtils.fixUrl( url, repository.getUser() );

        Commandline cl = createCommandLine( repository, fileSet.getBasedir(), version, url, recursive );

        SvnCheckOutConsumer consumer = new SvnCheckOutConsumer( getLogger(), fileSet.getBasedir() );

View Full Code Here

        if ( outputDirectory == null )
        {
            outputDirectory = fileSet.getBasedir().getAbsolutePath();
        }

        SvnScmProviderRepository repository = (SvnScmProviderRepository) repo;

        String url = repository.getUrl();

        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
        {
            if ( version instanceof ScmTag )
            {
                url = SvnTagBranchUtils.resolveTagUrl( repository, (ScmTag) version );
            }
            else if ( version instanceof ScmBranch )
            {
                url = SvnTagBranchUtils.resolveBranchUrl( repository, (ScmBranch) version );
            }
        }

        url = SvnCommandUtils.fixUrl( url, repository.getUser() );

        Commandline cl =
            createCommandLine( (SvnScmProviderRepository) repo, fileSet.getBasedir(), version, url, outputDirectory );

        SvnUpdateConsumer consumer = new SvnUpdateConsumer( getLogger(), fileSet.getBasedir() );
View Full Code Here

        if ( !fileSet.getFileList().isEmpty() )
        {
            throw new ScmException( "This provider doesn't support branching subsets of a directory" );
        }

        SvnScmProviderRepository repository = (SvnScmProviderRepository) repo;

        File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );

        try
        {
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository

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.