Search in sources :

Example 21 with StarteamScmProviderRepository

use of org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository in project maven-scm by apache.

the class StarteamEditCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, ScmFileSet fileSet, String commandLine) throws Exception {
    ScmRepository repo = getScmManager().makeScmRepository(scmUrl);
    StarteamScmProviderRepository repository = (StarteamScmProviderRepository) repo.getProviderRepository();
    Commandline cl = StarteamEditCommand.createCommandLine(repository, fileSet);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) StarteamScmProviderRepository(org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository)

Example 22 with StarteamScmProviderRepository

use of org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository in project maven-scm by apache.

the class StarteamRemoveCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, ScmFileSet fileSet, String crPath, String commandLine) throws Exception {
    ScmRepository repo = getScmManager().makeScmRepository(scmUrl);
    StarteamScmProviderRepository repository = (StarteamScmProviderRepository) repo.getProviderRepository();
    Commandline cl = StarteamRemoveCommand.createCommandLine(repository, fileSet);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) StarteamScmProviderRepository(org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository)

Example 23 with StarteamScmProviderRepository

use of org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository in project maven-scm by apache.

the class StarteamTagCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, File workDir, String tag, String commandLine) throws Exception {
    ScmRepository repo = getScmManager().makeScmRepository(scmUrl);
    StarteamScmProviderRepository repository = (StarteamScmProviderRepository) repo.getProviderRepository();
    Commandline cl = StarteamTagCommand.createCommandLine(repository, workDir, tag);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) StarteamScmProviderRepository(org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository)

Example 24 with StarteamScmProviderRepository

use of org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository in project maven-scm by apache.

the class StarteamScmProviderTest method testMultipleViewsUrl.

/**
 * To specify multiple views url, we must use '|'( pipe ) as separator,
 * must separate host and port using |
 *
 * @throws Exception
 */
public void testMultipleViewsUrl() throws Exception {
    String scmSpecificUrl = "user:password@host|1234|/project/rootview:subview/folder";
    // String scmSpecificUrl = "user:password@host|1234/project/rootview:subview/folder"; //should work as well
    StarteamScmProvider provider = new StarteamScmProvider();
    StarteamScmProviderRepository starteamProvider = (StarteamScmProviderRepository) provider.makeProviderScmRepository(scmSpecificUrl, '|');
    assertEquals("user", starteamProvider.getUser());
    assertEquals("password", starteamProvider.getPassword());
    assertEquals(1234, starteamProvider.getPort());
    assertEquals("host", starteamProvider.getHost());
    assertEquals("/project/rootview:subview/folder", starteamProvider.getPath());
    assertEquals("user:password@host:1234/project/rootview:subview/folder", starteamProvider.getFullUrl());
}
Also used : StarteamScmProviderRepository(org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository)

Aggregations

StarteamScmProviderRepository (org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository)24 Commandline (org.codehaus.plexus.util.cli.Commandline)22 StarteamCommandLineUtils (org.apache.maven.scm.provider.starteam.command.StarteamCommandLineUtils)11 ScmRepository (org.apache.maven.scm.repository.ScmRepository)11 CommandLineUtils (org.codehaus.plexus.util.cli.CommandLineUtils)11 File (java.io.File)6 ScmException (org.apache.maven.scm.ScmException)6 ScmFileSet (org.apache.maven.scm.ScmFileSet)6 IOException (java.io.IOException)1 AddScmResult (org.apache.maven.scm.command.add.AddScmResult)1 ChangeLogScmResult (org.apache.maven.scm.command.changelog.ChangeLogScmResult)1 ChangeLogSet (org.apache.maven.scm.command.changelog.ChangeLogSet)1 CheckInScmResult (org.apache.maven.scm.command.checkin.CheckInScmResult)1 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)1 DiffScmResult (org.apache.maven.scm.command.diff.DiffScmResult)1 EditScmResult (org.apache.maven.scm.command.edit.EditScmResult)1 RemoveScmResult (org.apache.maven.scm.command.remove.RemoveScmResult)1 StatusScmResult (org.apache.maven.scm.command.status.StatusScmResult)1 TagScmResult (org.apache.maven.scm.command.tag.TagScmResult)1 UnEditScmResult (org.apache.maven.scm.command.unedit.UnEditScmResult)1