Search in sources :

Example 21 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method checkIn.

/**
 * {@inheritDoc}
 */
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String message) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setScmVersion(CommandParameter.SCM_VERSION, scmVersion);
    parameters.setString(CommandParameter.MESSAGE, message);
    return checkin(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 22 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method changeLog.

/**
 * {@inheritDoc}
 */
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion, String datePattern) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setScmVersion(CommandParameter.START_SCM_VERSION, startVersion);
    parameters.setScmVersion(CommandParameter.END_SCM_VERSION, endVersion);
    parameters.setString(CommandParameter.CHANGELOG_DATE_PATTERN, datePattern);
    return changelog(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 23 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method edit.

/**
 * {@inheritDoc}
 */
public EditScmResult edit(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    return edit(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 24 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method checkOut.

/**
 * {@inheritDoc}
 */
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, boolean recursive) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setScmVersion(CommandParameter.SCM_VERSION, scmVersion);
    parameters.setString(CommandParameter.RECURSIVE, Boolean.toString(recursive));
    return checkout(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 25 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class IntegrityCommandTest method setUp.

/**
 * Sets up all commands for unit test execution
 */
protected void setUp() throws Exception {
    super.setUp();
    // Set the Change Package ID to :bypass as we wont have a valid Change Pacakge ID for automated tests
    System.setProperty("maven.scm.integrity.cpid", ":bypass");
    // Initialize our scmManager
    scmManager = getScmManager();
    // Initialize our logger
    LoggerManager loggerManager = (LoggerManager) getContainer().lookup(LoggerManager.ROLE);
    logger = new PlexusLogger(loggerManager.getLoggerForComponent(ScmManager.ROLE));
    // Construct the SCM Repository and initialize our command execution variables
    ScmRepository repo = scmManager.makeScmRepository(testScmURL);
    iRepo = (IntegrityScmProviderRepository) repo.getProviderRepository();
    fileSet = new ScmFileSet(getTestFile("target/test-execution"));
    parameters = new CommandParameters();
    // Set the tag name for our tag and branch commands
    parameters.setString(CommandParameter.TAG_NAME, "Maven-${new java.text.SimpleDateFormat(\"yyyyMMddHHmmssSSS\").format(new Date())}");
    // Connect to the MKS Integrity Server
    IntegrityLoginCommand login = new IntegrityLoginCommand();
    login.setLogger(logger);
    assertResultIsSuccess(login.execute(iRepo, fileSet, parameters));
    // Then make sure we've got a sandbox to work with
    IntegrityCheckOutCommand checkout = new IntegrityCheckOutCommand();
    checkout.setLogger(logger);
    assertResultIsSuccess(checkout.execute(iRepo, fileSet, parameters));
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) ScmFileSet(org.apache.maven.scm.ScmFileSet) IntegrityCheckOutCommand(org.apache.maven.scm.provider.integrity.command.checkout.IntegrityCheckOutCommand) PlexusLogger(org.apache.maven.scm.manager.plexus.PlexusLogger) IntegrityLoginCommand(org.apache.maven.scm.provider.integrity.command.login.IntegrityLoginCommand) LoggerManager(org.codehaus.plexus.logging.LoggerManager) CommandParameters(org.apache.maven.scm.CommandParameters)

Aggregations

CommandParameters (org.apache.maven.scm.CommandParameters)68 ScmFileSet (org.apache.maven.scm.ScmFileSet)44 File (java.io.File)39 AbstractAccuRevCommandTest (org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest)38 Test (org.junit.Test)38 ScmFileMatcher.assertHasScmFile (org.apache.maven.scm.ScmFileMatcher.assertHasScmFile)23 ScmFile (org.apache.maven.scm.ScmFile)8 ScmTag (org.apache.maven.scm.ScmTag)7 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)7 Date (java.util.Date)6 ChangeFile (org.apache.maven.scm.ChangeFile)5 ChangeFileMatcher.changeFile (org.apache.maven.scm.ChangeFileMatcher.changeFile)5 ScmRevision (org.apache.maven.scm.ScmRevision)5 ExportScmResult (org.apache.maven.scm.command.export.ExportScmResult)5 InfoScmResult (org.apache.maven.scm.command.info.InfoScmResult)5 LoginScmResult (org.apache.maven.scm.command.login.LoginScmResult)5 AccuRevInfo (org.apache.maven.scm.provider.accurev.AccuRevInfo)5 Transaction (org.apache.maven.scm.provider.accurev.Transaction)5 ArrayList (java.util.ArrayList)4 ScmException (org.apache.maven.scm.ScmException)4