int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );
if ( exitCode != 0 )
{
return new UpdateScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(), false );
}
else
{
//hiden feature to allow Continuous Integration machine to
// delete local files. It affectively remove all build ouput as well
String doDeleteLocal = System.getProperty( "maven.scm.starteam.deleteLocal" );
if ( "true".equalsIgnoreCase( doDeleteLocal ) )
{
this.deleteLocal( repository, fileSet, version );
}
}
}
else
{
//update only interested files already on the local disk
for ( int i = 0; i < updateFiles.size(); ++i )
{
File updateFile = (File) updateFiles.get( i );
ScmFileSet scmFileSet = new ScmFileSet( fileSet.getBasedir(), updateFile );
Commandline cl = createCommandLine( repository, scmFileSet, version );
int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );
if ( exitCode != 0 )
{
return new UpdateScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(),
false );
}
}
}
return new UpdateScmResult( null, consumer.getCheckedOutFiles() );
}