if (name != null) {
baselineName = parsePropertiesInString(name, logProperties);
}
// Create the CM Synergy command line
ManagedCommandline cmd = CMSynergy.createCcmCommand(
getCcmExe(), getSessionName(), getSessionFile());
cmd.createArgument().setValue("baseline");
cmd.createArgument().setValue("-create");
if (baselineName != null) {
cmd.createArgument().setValue(baselineName);
}
if (description != null) {
cmd.createArgument().setValue("-description");
cmd.createArgument().setValue(description);
}
cmd.createArgument().setValue("-release");
cmd.createArgument().setValue(getProjectRelease());
cmd.createArgument().setValue("-purpose");
cmd.createArgument().setValue(purpose);
cmd.createArgument().setValue("-project");
cmd.createArgument().setValue(getProject());
cmd.createArgument().setValue("-subprojects");
// Create the baseline
try {
cmd.execute();
cmd.assertExitCode(0);
} catch (Exception e) {
StringBuffer error = new StringBuffer(
"Failed to create intermediate baseline for project \"");
error.append(getProject());
error.append("\".");