Search in sources :

Example 26 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceScmProviderTest method testParseConnectionWithUsername.

public void testParseConnectionWithUsername() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:username@//depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertNull(p4Repo.getHost());
    assertEquals(0, p4Repo.getPort());
    assertEquals("username", p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 27 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceScmProviderTest method testParseConnectionWithHostAndPort.

public void testParseConnectionWithHostAndPort() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:host:1234://depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertEquals("host", p4Repo.getHost());
    assertEquals(1234, p4Repo.getPort());
    assertNull(p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 28 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceScmProviderTest method testParseConnection.

public void testParseConnection() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce://depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertNull(p4Repo.getHost());
    assertEquals(0, p4Repo.getPort());
    assertNull(p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
    assertTrue(StringUtils.isBlank(p4Repo.getProtocol()));
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 29 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceScmProviderTest method testParseConnectionWithHostPortAndUsername2.

public void testParseConnectionWithHostPortAndUsername2() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:username@host:1234://depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertEquals("host", p4Repo.getHost());
    assertEquals(1234, p4Repo.getPort());
    assertEquals("username", p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 30 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceScmProviderTest method testParseConnectionWithSsl.

public void testParseConnectionWithSsl() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:ssl:host:1066://depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertEquals("host", p4Repo.getHost());
    assertEquals(1066, p4Repo.getPort());
    assertNull(p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
    assertEquals("ssl", p4Repo.getProtocol());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Aggregations

PerforceScmProviderRepository (org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)31 ScmRepository (org.apache.maven.scm.repository.ScmRepository)23 Commandline (org.codehaus.plexus.util.cli.Commandline)19 File (java.io.File)6 ScmFileSet (org.apache.maven.scm.ScmFileSet)5 CommandLineException (org.codehaus.plexus.util.cli.CommandLineException)5 CommandLineUtils (org.codehaus.plexus.util.cli.CommandLineUtils)5 ByteArrayInputStream (java.io.ByteArrayInputStream)2 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)2 BufferedReader (java.io.BufferedReader)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 HashSet (java.util.HashSet)1 CommandParameters (org.apache.maven.scm.CommandParameters)1 ScmException (org.apache.maven.scm.ScmException)1 ScmFile (org.apache.maven.scm.ScmFile)1 ScmRevision (org.apache.maven.scm.ScmRevision)1 BlameLine (org.apache.maven.scm.command.blame.BlameLine)1 BlameScmResult (org.apache.maven.scm.command.blame.BlameScmResult)1 ChangeLogScmResult (org.apache.maven.scm.command.changelog.ChangeLogScmResult)1