public void executeTask( Task t )
throws TaskExecutionException
{
log.info( "Checkout task executor.." );
CheckOutTask task = (CheckOutTask) t;
int projectId = task.getProjectId();
Project project;
try
{
project = projectDao.getProjectWithBuildDetails( projectId );
}
catch ( ContinuumStoreException ex )
{
log.error( "Internal error while getting the project.", ex );
return;
}
String workingDirectory = task.getWorkingDirectory().getAbsolutePath();
Map<String, Object> context = new HashMap<String, Object>();
context.put( AbstractContinuumAction.KEY_PROJECT_ID, new Integer( projectId ) );
context.put( AbstractContinuumAction.KEY_PROJECT, project );
context.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY, workingDirectory );
context.put( AbstractContinuumAction.KEY_SCM_USERNAME, task.getScmUserName() );
context.put( AbstractContinuumAction.KEY_SCM_PASSWORD, task.getScmPassword() );
try
{
actionManager.lookup( "checkout-project" ).execute( context );