if ( getLogger().isDebugEnabled() )
{
getLogger().debug( "executing add command..." );
}
SynergyScmProviderRepository repo = (SynergyScmProviderRepository) repository;
if ( getLogger().isDebugEnabled() )
{
getLogger().debug( "basedir: " + fileSet.getBasedir() );
}
if ( message == null || message.equals( "" ) )
{
message = "Maven SCM Synergy provider: adding file(s) to project " + repo.getProjectSpec();
}
String ccmAddr = SynergyUtil.start( getLogger(), repo.getUser(), repo.getPassword(), null );
try
{
int taskNum = SynergyUtil.createTask( getLogger(), message, repo.getProjectRelease(), true, ccmAddr );
String projectSpec =
SynergyUtil.getWorkingProject( getLogger(), repo.getProjectSpec(), repo.getUser(), ccmAddr );
if ( projectSpec == null )
{
throw new ScmException( "You should checkout a working project first" );
}
File waPath = SynergyUtil.getWorkArea( getLogger(), projectSpec, ccmAddr );
File destPath = new File( waPath, repo.getProjectName() );
for ( File source : fileSet.getFileList() )
{
File dest = new File( destPath, SynergyUtil.removePrefix( fileSet.getBasedir(), source ) );
if ( !source.equals( dest ) )
{