Package org.apache.maven.scm.repository

Examples of org.apache.maven.scm.repository.ScmRepository


                + this.scmConnectionInfo + "\n    " + this.scmAccessInfo);
    }

    try
    {
      final ScmRepository repository =
          scmConnectionInfo.createRepository(scmManager);
      final ScmProvider provider = createScmProvider(repository);

      final ScmResultWrapper result = execute(fileSet, repository, provider);
      if (result.isSuccess())
View Full Code Here


  {
    final String scmConnection = getConnection();
    final ScmCredentials credentials = scmInfo.getScmCrendentials();
    if (credentials.getUserName() == null || credentials.getPassword() == null)
    {
      final ScmRepository repository =
          scmInfo.getScmManager().makeScmRepository(scmConnection);
      if (repository.getProviderRepository() instanceof ScmProviderRepositoryWithHost)
      {
        final ScmProviderRepositoryWithHost repositoryWithHost =
            (ScmProviderRepositoryWithHost) repository.getProviderRepository();
        final String host = createHostName(repositoryWithHost);
        credentials.configureByServer(host);
      }
    }
View Full Code Here

        ScmVersion scmVersion = getScmVersion( configuration );

        // TODO: probably need to base this from a working directory in the main configuration
        File workingDirectory = configuration.getWorkingDirectory();

        ScmRepository repository = getScmRepository( configuration );

        CheckOutScmResult result;

        // TODO: synchronizing *all* checkouts is unnecessary
        synchronized ( this )
View Full Code Here

            throw new IllegalStateException(
                "The working directory for the project doesn't exist " + "(" + workingDirectory.getAbsolutePath() +
                    ")." );
        }

        ScmRepository repository = getScmRepository( configuration );

        // Some SCM provider requires additional system properties during update
        if ( "starteam".equals( repository.getProvider() ) )
        {
            // TODO: remove the use of system property - need a better way to pass provider specific configuration

            // Remove the clientspec name, so it will be recalculated between each command for each project
            // instead of use the same for all projects
View Full Code Here

        ScmVersion scmVersion = getScmVersion( configuration );

        // TODO: probably need to base this from a working directory in the main configuration
        File workingDirectory = configuration.getWorkingDirectory();

        ScmRepository repository = getScmRepository( configuration );

        ChangeLogScmResult result;

        ScmFileSet fileSet = new ScmFileSet( workingDirectory );
View Full Code Here

     * @throws ScmRepositoryException
     */
    private ScmRepository getScmRepository( ContinuumScmConfiguration configuration )
        throws ScmRepositoryException, NoSuchScmProviderException
    {
        ScmRepository repository = scmManager.makeScmRepository( configuration.getUrl() );

        // TODO: tie together with the clientspec change below
        // This checkout will be retained between uses, so it remains connected to the repository
        repository.getProviderRepository().setPersistCheckout( true );

        // TODO: should this be svnexe?
        if ( !configuration.isUseCredentialsCache() || !"svn".equals( repository.getProvider() ) )
        {
            if ( !StringUtils.isEmpty( configuration.getUsername() ) )
            {
                repository.getProviderRepository().setUser( configuration.getUsername() );

                if ( !StringUtils.isEmpty( configuration.getPassword() ) )
                {
                    repository.getProviderRepository().setPassword( configuration.getPassword() );
                }
                else
                {
                    repository.getProviderRepository().setPassword( "" );
                }
            }
        }

        if ( "perforce".equals( repository.getProvider() ) )
        {
            // TODO: remove the use of system property - need a better way to pass provider specific configuration

            // Remove the clientspec name, so it will be recalculated between each command for each project
            // instead of use the same for all projects
View Full Code Here

    {
        ReleaseResult relResult = new ReleaseResult();

        logInfo( relResult, "Updating local copy against the scm..." );

        ScmRepository repository;
        ScmProvider provider;
        try
        {
            repository = scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, settings );
View Full Code Here

        ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
        descriptor.setInteractive( false );
        descriptor.setScmSourceUrl( "scm:svn:file://localhost/" + scmPath + "/trunk" );
        descriptor.setWorkingDirectory( workDir.getAbsolutePath() );

        ScmRepository repository = getScmRepositorty( descriptor.getScmSourceUrl() );
        ScmFileSet fileSet = new ScmFileSet( workDir );
        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion) null );

        String pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
        assertTrue( "Test dev version", pom.indexOf( "<version>1.0-SNAPSHOT</version>" ) > 0 );
View Full Code Here

        descriptor.setScmSourceUrl( "scm:svn:file://localhost/" + scmPath + "/trunk" );
        descriptor.setWorkingDirectory( workDir.getAbsolutePath() );
        descriptor.mapReleaseVersion( "test-group:test-artifact", "2.0" );
        descriptor.mapDevelopmentVersion( "test-group:test-artifact", "2.1-SNAPSHOT" );

        ScmRepository repository = getScmRepositorty( descriptor.getScmSourceUrl() );
        ScmFileSet fileSet = new ScmFileSet( workDir );
        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion) null );

        String pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
        assertTrue( "Test dev version", pom.indexOf( "<version>1.1-SNAPSHOT</version>" ) > 0 );
View Full Code Here

        ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
        descriptor.setInteractive( false );
        descriptor.setScmSourceUrl( "scm:svn:file://localhost/" + scmPath + "/trunk" );
        descriptor.setWorkingDirectory( workDir.getAbsolutePath() );

        ScmRepository repository = getScmRepositorty( descriptor.getScmSourceUrl() );
        ScmFileSet fileSet = new ScmFileSet( workDir );
        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion) null );

        String pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
        assertTrue( "Test dev version", pom.indexOf( "<version>1.1-SNAPSHOT</version>" ) > 0 );
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.repository.ScmRepository

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.