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);
}
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);
}
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);
}
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);
}
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));
}
Aggregations