/**
  * @param \TYPO3\Surf\Domain\Model\Deployment $deployment
  *
  * @return void
  *
  * @throws TaskExecutionException
  */
 protected function setApplication(Deployment $deployment)
 {
     $applications = $deployment->getApplications();
     if (count($applications) < 1) {
         throw new TaskExecutionException("There is no application set for the deployment '{$deployment->getName()}'. Please check your TYPO3/Surf configuration.");
     }
     $this->application = array_shift($applications);
 }