// Create the JazzScmCommand to execute the "scm deliver ..." command
// This will deliver the changes to the flow target (stream or other workspace).
public JazzScmCommand createDeliverCommand( JazzScmProviderRepository repo, ScmFileSet fileSet )
{
JazzScmCommand command = new JazzScmCommand( JazzConstants.CMD_DELIVER, repo, fileSet, getLogger() );
if ( repo.getWorkspace() != null && !repo.getWorkspace().equals( "" ) )
{
command.addArgument( JazzConstants.ARG_DELIVER_SOURCE );
command.addArgument( repo.getWorkspace() );
}
if ( repo.getFlowTarget() != null && !repo.getFlowTarget().equals( "" ) )
{
command.addArgument( JazzConstants.ARG_DELIVER_TARGET );
command.addArgument( repo.getFlowTarget() );
}
// This command is needed so that the deliver operation will work.
// Files that are not under source control (a--) [temp files etc]
// will cause the deliver operation to fail with the error:
// "Cannot deliver because there are one or more items that are not checked in.
// Check in the changes or rerun with --overwrite-uncommitted."
// However, from the maven perspective, we only need files that are
// under source control to be delivered. Maven has already checked
// for this (via the status command).
//
// So we add this argument to allow the deliver to work.
command.addArgument( JazzConstants.ARG_OVERWRITE_UNCOMMITTED );
return command;
}