Search in sources :

Example 11 with ScmProviderRepository

use of org.apache.maven.scm.provider.ScmProviderRepository in project maven-scm by apache.

the class LocalRepositoryTest method testExistingRepository.

public void testExistingRepository() throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository("scm:local:src/test/repository:test-repo");
    assertNotNull(repository);
    assertEquals("local", repository.getProvider());
    // assertEquals( "src/test/repositories:test-repo", repository.getScmSpecificUrl() );
    ScmProviderRepository providerRepository = repository.getProviderRepository();
    assertNotNull(providerRepository);
    assertTrue(providerRepository instanceof LocalScmProviderRepository);
    LocalScmProviderRepository local = (LocalScmProviderRepository) providerRepository;
    assertEquals(getTestFile("src/test/repository").getAbsolutePath(), local.getRoot());
    assertEquals("test-repo", local.getModule());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) ScmProviderRepository(org.apache.maven.scm.provider.ScmProviderRepository)

Aggregations

ScmProviderRepository (org.apache.maven.scm.provider.ScmProviderRepository)11 ScmFileSet (org.apache.maven.scm.ScmFileSet)6 ScmProvider (org.apache.maven.scm.provider.ScmProvider)6 ScmRepository (org.apache.maven.scm.repository.ScmRepository)5 CommandParameters (org.apache.maven.scm.CommandParameters)4 InfoScmResult (org.apache.maven.scm.command.info.InfoScmResult)4 IOException (java.io.IOException)2 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)2 ScmException (org.apache.maven.scm.ScmException)2 ScmVersion (org.apache.maven.scm.ScmVersion)2 ScmProviderRepositoryWithHost (org.apache.maven.scm.provider.ScmProviderRepositoryWithHost)2 SvnScmProviderRepository (org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository)2 FileNotFoundException (java.io.FileNotFoundException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 ParseException (java.text.ParseException)1 MavenReportException (org.apache.maven.reporting.MavenReportException)1 ScmRepositoryException (org.apache.maven.scm.repository.ScmRepositoryException)1 SecDispatcherException (org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException)1